Rajesh said:
What we want is:
if user closes the browser
Or
goes to some other website, either by explicitly typing the URL, or
clicking on browser back
and forward buttons, then we want to invalidate the session and close
the connection.
So how do I trap the browser close event and how do I trap whether the
user
has left the website or not.
This is basic stuff. You just put an object on the session which implements
HttpSessionBindingListener. If you do that your listener object will recieve
an event when the session dies (ie: the user closes the browser or has
surfed on for a significant time). You can then obtain the Connection from
the session and close it.
This has been discussed (about a gazillion times) here on this list.
Check the archives and other sites for more details.
Nic Ferrier
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html