Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Session Time out problem

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 40913
840
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic