On Tue, 10 Sep 2002, randie ursal wrote:

> so that i can invalidate instantly the session associated with that browser.
>
> i tried implementing the session listener concept but when i close the
> browser the
> session object hasn't been unbound...instead it waits for its session
> timeout to expire
> before it invalidates the session.
>
> is there a way i can get notified and invalidate the session the moment
> the browser closes?
>
> i'm using servlet...i'm not planning on putting javascript...is it
> possible?
>
> thanks a lot

Have you searched the list archives?  This has been discussed many
times before.

The consensus answer is that there's no easy way to do this (remember,
HTTP is a stateless protocol), and you're going to have to rely on a
timeout mechansim to at least some degree.  If there is a security
issue, you'll have to make the timeout short.

The best approaches to doing this involve applets and/or javascript,
but for a variety of reasons, they still won't get you 100% coverage.


> Albert Pi wrote:
>
> >What's the reason you want do that ?
> >
> >Albert Pi
> >Corp IS System Delivery
> >516-803-3762
> >
> >
> >>>>[EMAIL PROTECTED] 09/09/02 06:42AM >>>
> >hi,
> >
> >   can anyone have an idea about this.
> >
> >   how can i check or get notified on my servlet if the client browser
> >has close?
> >   also when my session has timeout?
> >
> >   is there any event notification that my servlet would receive or i
> >have to check
> >   it manually?
> >
> >   i'm using Tomcat 4.0.
> >
> >thanks
> >
> >   randie
>

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
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