I am New to struts2 framework. I have created a login interceptor which will intercept every action to make sure user object in session, if not, redirect to login page or creates user if request coming from login page.

I'm a little confused here. The only place in this code that I see you trying to find USER_HANDLE you are checking the request object for it. But when you create a value that you tie to USER_HANDLE you store it in the session object.

Is the code that you are using to check the vaule of USER_HANDLE that is stored in the session object not posted here? If so, please post it. If not then I think the problem is that you are using request.getParameter(USER_HANDLE); rather than session.getAttribute (USER_HANDLE, user);

prveen dhannapuneni
Greenhorn

Joined: Oct 13, 2007
Posts: 7

posted Nov 20, 2008 07:21:00

0

Thanks Tom. this is my coding mistake, i have used request object instead of session object to lookup the user object. Once again thanks for help.