This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Time out problem

 
mridul das
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a user times out in an web app. he is directed to the login page. On successfully logging in he's directed to the page he requested beore he timed out.
We require that the user on being timed out should be taken to the home page and not the requested page. But i want to know where the server stores the original request.And how do I modify it so that I can change the URI or whatever required.
Could any one provide a solution.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mridul,
The server doesn't store the original request. You would have to write your servlet to put the request URL in the session and then redirect to the home page. Upon successful login, you can check in the session to see the original request.

So there are three states for the session:
- no session (new user)
- session with stored URL
- logged in session
 
dema rogatkin
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an opposite problem after relogin a user brought to a home page. How I can reach the behavior you have?
 
mridul das
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>The server doesn't store the original request. You would have to write >your servlet to put the request URL in the session and then redirect to >the home page. Upon successful login, you can check in the session to see >the original request.

>So there are three states for the session:
>- no session (new user)
>- session with stored URL
>- logged in session


I cant put the URL in session becoz the server will remove everything from session upon session invalidation. So i wont get back the URL.
I need some way to determine that the user has timed out. And there's a deiiference betwee timed out and logout and opening a new browser to access the application.
Once the user times out the after loggin in the request is the same. But if he logouts or starts a browser than after loggin in he's taken to the home page. So the server has some code which decides that after security check where is the user supposed to be directed.And in all this cases a new session is created.
I want to catch that session timeout event. We are using Weblogic 8.1 SP3.
I am not sure if the SessionListener can tell me why was the session destroyed.Whether the user loggout or a session timed out happened.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic