We have portal system.We are facing the problem eventhough when we quit the
Internet Explorer browser where we launch the system, session variable are
residing in the servlet container.How do we know the browser has been closed in the
server side. How do we invalidate that session. Even though there is method called
invalidate() and valueUnBound(). Which time I have to call to invalidate the session.
Thanks in advannce,
to my opinion you have no possibility to check that.
All you can do is to set the session-timout in the web.xml.
One option would be to implement a HttpSessionListener for your web application and wait for the timeout.
Another would be to include a script (attached to browser close event) that will log out the user with each page.
As a comment:
The first opinion does not detect if the browser closes. Thus you have to wait for the whole session-timeout.