Subversion Repositories SmartDukaan

Rev

Rev 1713 | Rev 2148 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1713 Rev 1957
Line 1... Line 1...
1
package in.shop2020.serving.controllers;
1
package in.shop2020.serving.controllers;
2
 
2
 
-
 
3
import in.shop2020.serving.utils.DataLogger;
-
 
4
import in.shop2020.serving.utils.DataLogger.Event;
3
import in.shop2020.thrift.clients.UserContextServiceClient;
5
import in.shop2020.thrift.clients.UserContextServiceClient;
4
 
6
 
5
import java.util.Date;
7
import java.util.Date;
6
import javax.servlet.http.Cookie;
8
import javax.servlet.http.Cookie;
7
 
9
 
-
 
10
import org.apache.commons.lang.StringUtils;
8
import org.apache.log4j.Logger;
11
import org.apache.log4j.Logger;
9
import org.apache.struts2.convention.annotation.Result;
12
import org.apache.struts2.convention.annotation.Result;
10
import org.apache.struts2.convention.annotation.Results;
13
import org.apache.struts2.convention.annotation.Results;
11
 
14
 
12
/**
15
/**
Line 27... Line 30...
27
	private static final long serialVersionUID = 1L;
30
	private static final long serialVersionUID = 1L;
28
	/**
31
	/**
29
	 * 
32
	 * 
30
	 */
33
	 */
31
	private static Logger log = Logger.getLogger(Class.class);
34
	private static Logger log = Logger.getLogger(Class.class);
-
 
35
	private static Logger dataLog = DataLogger.getLogger();
32
	
36
	
33
	public LogoutController() {
37
	public LogoutController() {
34
		super();
38
		super();
35
		
39
		
36
	}
40
	}
Line 45... Line 49...
45
			uidCookie.setPath("/");
49
			uidCookie.setPath("/");
46
			uidCookie.setValue("");
50
			uidCookie.setValue("");
47
			uidCookie.setMaxAge(0);
51
			uidCookie.setMaxAge(0);
48
	    	this.response.addCookie(uidCookie);
52
	    	this.response.addCookie(uidCookie);
49
		}	
53
		}	
-
 
54
		dataLog.info(StringUtils.join(
-
 
55
                new String[] { Event.LOGOUT.name(),
-
 
56
                        userinfo.getEmail() }, ", "));
50
		return "success";
57
		return "success";
51
    	
58
    	
52
    }
59
    }
53
        
60
        
54
 
61