Subversion Repositories SmartDukaan

Rev

Rev 781 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 781 Rev 816
Line 18... Line 18...
18
	/**
18
	/**
19
	 * 
19
	 * 
20
	 */
20
	 */
21
	private static final long serialVersionUID = 1L;
21
	private static final long serialVersionUID = 1L;
22
	private static Log log = LogFactory.getLog(LoginInterceptor.class);
22
	private static Log log = LogFactory.getLog(LoginInterceptor.class);
-
 
23
	
-
 
24
	public static String REDIRECT_URL = "REDIRECT_URL";
23
 
25
 
24
	@Override
26
	@Override
25
	public String intercept(ActionInvocation invocation) throws Exception {
27
	public String intercept(ActionInvocation invocation) throws Exception {
26
		HttpServletRequest request = ServletActionContext.getRequest();
28
		HttpServletRequest request = ServletActionContext.getRequest();
27
        HttpSession session = request.getSession(); // Get the existing session or create a new one
29
        HttpSession session = request.getSession(); // Get the existing session or create a new one
Line 40... Line 42...
40
			queryString = "";
42
			queryString = "";
41
		} else {
43
		} else {
42
			queryString = "?" + queryString;
44
			queryString = "?" + queryString;
43
		}
45
		}
44
		log.info("Redirect Url : " + request.getRequestURI() + queryString);
46
		log.info("Redirect Url : " + request.getRequestURI() + queryString);
45
		request.getSession().setAttribute("REDIRECT_URL",
47
		request.getSession().setAttribute(REDIRECT_URL,
46
				request.getRequestURI() + queryString);
48
				request.getRequestURI() + queryString);
47
	}
49
	}
48
}
50
}