When I tested the HttpSessionBindingListener, when the
user close the browser the unBoundValue() is not
called. It is called until the session times out.
--- Nic Ferrier <[EMAIL PROTECTED]> wrote:
> 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
>
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
___________________________________________________________________________
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