File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to find wether a session is valid using Session ID. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to find wether a session is valid using Session ID." Watch "How to find wether a session is valid using Session ID." New topic
Author

How to find wether a session is valid using Session ID.

I Arvind Jai
Greenhorn

Joined: Feb 21, 2007
Posts: 1
Hi,
I have a requirement in my application to reset DB status of a UserID when the users session gets invalidated upon network disconnection. To do this, my idea is to store the Session ID of the users in DB and then periodically check the validity of session using Session ID and then update status in DB when the session is found invalid.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61180
    
  66

Not the best solution, in my opinion.

Rather, you can have the user id stored in the session, and use a session listener to know when the session is about to be destoryed.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to find wether a session is valid using Session ID.