View Single Post
  #1 (permalink)  
Old 04-09-2008, 12:52 PM
sanjeevtarar's Avatar
sanjeevtarar sanjeevtarar is offline
Senior Member
 
Join Date: Apr 2008
Location: Delhi(India)
Posts: 249
sanjeevtarar is on a distinguished road
[SOLVED] logout user when session expires
Hi All,

I have developed a web application. In which i want to add logout functionality. For this i used HttpSessionListener, but not working as i wanted.

I marked user logout in sessionDestroyed() method(by updating Database).

If session is timeout then container calls the sessionDestroyed() method and i update the Database but when i explicitly call session.invalidate() (when user click on logout link)values are unbind from session object but container does not call sessionDestroyed() method so not able to update database.

and also need to logout user when user closes browser window.


Please give your valuable idea on the same.

sanjeev
Reply With Quote
Sponsored Links