Use HttpSession. Save the session's lastAccessTime (by
session.getLastAccessTime()) with sessionID in a Hashtable. Set a timeout and
start a thread to check if there is a session expired when initializing the
servlet. When the session is expired, force it logout.

Regards,

Sean Jiang

Software Engineer
China Technical Development Center,
Sun Microsystems, Inc.


> Date: Tue, 16 Nov 1999 20:10:39 -0800
> From: Joe Lei <[EMAIL PROTECTED]>
> Subject: How to know a brower closed
> To: [EMAIL PROTECTED]
>
> 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

Reply via email to