You can also use the HttpSessionBindingListener interface if you want a class
to be notified when objects are added to and/or removed from an HttpSession.
You could use this to gracefully close DB connections, etc. when objects are
removed from the session. Objects can be removed from the session either
explicitly by the programmer, or by the servlet engine after the time-out
period has elapsed.
Michael
Gilad Tiram wrote:
> Hello Andreas,
>
> You can save the user resources in Session which is actually will take
> resources on the client side.
> I think that this session is killed automatically after some time out.
>
> Gilad.
>
> -----Original Message-----
> From: Andres Portillo [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, May 03, 1999 7:14 PM
> To: [EMAIL PROTECTED]
> Subject: How to know when an user logout??
>
> Hi everybody:
>
> Do you know if there is way to know when a user is not longer
> using
> a servlet (like a logout). By example an user
> login in my servlet, when this happen the servlet creates some
> resources
> and save handles to that resources in the session
> associated with that user. I'd would like to know when the user
> logout
> (shutdown the browser, or go to another web page)
> so the servlet can release those resources...
>
> I would appreciate any help.. Thanx
>
> Andres Portillo
>
> ___________________________________________________________________________
> 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
___________________________________________________________________________
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