This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

Session need to be destroyed when browser closes

Satchidananda Mohanty
Ranch Hand
Posts: 78
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi there,

In one web application I use java,jsp,servlets,struts.
Just wanted to destroy the session when the browser is closed by the end user.
Where I can put some code to destroy the session and update the status of that user in the database.

Briefly in that application I have restricted multiple login of the same user.
So if the user closes the browser without clicking the log out then the status of the user in the database Should update for the next time login.

Kindly help .

Thanks in advance.
Bear Bibeault
Author and ninkuma
Posts: 64843
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
This has been discusses dozens of times. Please SearchFirst for previous discussions.

The synopsis is that there is no way to reliably know when the browser closes so you need to rely upon the session timeout.
    Bookmark Topic Watch Topic
  • New Topic