Since HTTP is a connection-less protocol, there is no way the server will be
informed that the browser is no longer running. As far as the server is
concerned, the browser IS NOT running until the next request comes!

The only way you can do what you want to do is by implementing something on the
client

You could either have a JavaScript onUnload event handler , or have an
[invisible] applet that only implements the destroy() method, to notify the
server.

Emmanuel JEGOU wrote:

> Hi,
>
> I use sessions in my servlet and I would like to if it is possible to
> know when the user close the browser window in order to initialize
> something in my servlet.
> So when the user will launch its browser later, the session will be new
> !
>
> thanks.
>
> Emmanuel.

-- V

___________________________________________________________________________
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

Reply via email to