This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes User Timeout or Logout? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "User Timeout or Logout?" Watch "User Timeout or Logout?" New topic

User Timeout or Logout?

Chris Heady

Joined: Jun 28, 2001
Posts: 9
I am building a web application that will need to give a specific error message based on whether the persons session timed out or they logged out of the application. Both cases mean that the user will be redirected to the login page, but I want to have a different error message in each case. The problem I am coming to is how to tell the difference. I don't really want to use cookies to store the state. I know that I can use a session binding listener on timeout to do something before the timeout, but I have no real place to store the state. I can't store it on the database because I have to check this before we know who the user is.
Also I thought that there might be a way to tell the difference intrinsically with the invalidated session itself. But both use cases invalidate the session, and there is not way to get information from it since it throws an exception so I have to persist this state information elsewhere.
If anyone has any ideas on this subject, they would be greatly appreciated. Thanks.
Chris Heady
[This message has been edited by Chris Heady (edited June 28, 2001).]
I agree. Here's the link:
subject: User Timeout or Logout?
It's not a secret anymore!