I'm planning to extend RequestProcessor class to know whether session is expired or not. (Instead of doing it in every action class)
I want to know how to differentiate the new request from the 'session-expired*' request
'session-expired' request : request that is made after session-timeout.
Because for both type of requests session.getSession(true) will return new Session objects.
I need to display same page for both type of requests but with a message for 'session-expired' request.
Note: My problem is NOT about differentiating new requests from subsequent requests (which is part of the existing session) I can accomplish it by addding an object to the session intially and look for the object to know whether the request is part of exisitng session or not.
Hope my question is clear. If not, please let me know.
[ December 05, 2008: Message edited by: Suresh Gopi ] [ December 05, 2008: Message edited by: Suresh Gopi ]
Can you clarify this a little more? I'm not sure how you're using this 'session-expired' request. What is your process flow for generating this request? When is the new Session created in relation to it?
Joined: Mar 08, 2007
Actually i wanted to differentiate the very first request from subsequent requests which are not part of the existing session to the application.
The problem was i wanted to do this check in class which is a subclass of RequestProcessor.
By 'session-expired request' i meant the request sent to Server App by the browser after the current page's session timeout.
I solved it. i'm justusing request.getServletPath() to know the action path name from that i determine whether the request is for the starting page of application or other pages.
if it is for other pages the request should be associated with session, i'll retrieve the session associated with the request and check for the object that i stored initially after i created my new Session.
If it is present then i assume the request is not STALE otherwise it is expired.
Thanks for your time Tom. [ December 08, 2008: Message edited by: Suresh Gopi ]
subject: Extending RequestProcessor for Session Management