wood burning stoves 2.0*
The moose likes JSP and the fly likes Upon session timeout, how to return a user back to that page upon login? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Upon session timeout, how to return a user back to that page upon login?" Watch "Upon session timeout, how to return a user back to that page upon login?" New topic
Author

Upon session timeout, how to return a user back to that page upon login?

Sean Gildea
Ranch Hand

Joined: Jul 01, 2004
Posts: 81
Hey Everyone,

First of all thank you for taking the time to look at my issue. I'm looking for some general ideas on how to return a timed out user back to the page they were looking at. I already did a search on this forum and couldnt find anything related.

Do I need to use a database persistence method to accomplish this?

Is it possible to get the page name from the request upon session logout and then store that or read that from the login page?

Thanks!
Sean Gildea


SCJD, SCBCD, SCJP
jiju ka
Ranch Hand

Joined: Oct 12, 2004
Posts: 306
Having a login page implies that the user can be identified by a userid.

I am making another assumption that there will be only one session per userid.

You don't need to persist the userid - last page association. You can keep this association in a singleton pattern.
Rao Raghu
Ranch Hand

Joined: Jan 05, 2007
Posts: 100
Is it possible to get the page name from the request upon session logout and then store that or read that from the login page?


You have already found the solution. Read that from the login page.


RAGHU<br /> <br />"When the going gets tough, the tough get going"
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
You can get it from request object. Use request.getRequestURI().
[ February 13, 2007: Message edited by: Adeel Ansari ]
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
Or you can use request.getRequestURL() from J2EE 1.4 onwards.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Upon session timeout, how to return a user back to that page upon login?