Considering http is inherently stateless, I dont see how you can detect
something of the sort without any explicit participation from the user.

One way I can think of is, if you can load a tiny applet on the users
browser, and have the applet ping the web server (or the other way around)
every few minutes, that way you will have redundant connections from user
who did not exit gracefully, for a maximum of the time interval between 2
pings.
But then again, with applets you have a whole new set of issues to deal with
(firewall, et al).

 - Chinmay.


> ----------
> From:         Pankaj[SMTP:[EMAIL PROTECTED]]
> Reply To:     A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology.
> Sent:         Tuesday, November 16, 1999 11:56 PM
> To:   [EMAIL PROTECTED]
> Subject:      Re: [How to know a brower closed]
>
> Hello,
>
> I also have same question. Also i would like to know what are the ways to
> find out in my Servlet "whether the user is still available or not whether
> he
> has closed the browser/ cancelled the request by pressing the "ESC" key /
> shut
> down his browser / or he has got disconnected".
>
> I had taken a look at the Session Object.. but don't think it will help(
> or
> will it..!!?? ).
>
> Please help both of us.
>
> Thanx,
> Pankaj.
>
> Joe Lei <[EMAIL PROTECTED]> wrote:
> Hi there
>
> is it possible to notify a servlet from the client side (using
> JavaScript/applet to servlet communication or else) when the user close
> the
> brower (without explicitly logout) so that the clean up process, like
> closing
> db connection, invalidating session object etc. can be triggered.
>
> If there're any alternative, pls suggest.  Thx
> Joe
>
> __________________________________________________________________________
> _
> 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
>
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> __________________________________________________________________________
> _
> 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
>

___________________________________________________________________________
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