You *can* get guaranteed notification by placing a non-visible applet on
the page that opens a socket back to the server, and fires a message down
the socket on closing; the HTML browsers are required to call the applet's
"stop" method when it terminates for any reason, either leaving the page
or closing the browser.
Unless somebody knows better re: the "browser-applet" specification....
Ted Neward
http://www.javageeks.com/~tneward
On Fri, 3 Dec 1999, Thor HW wrote:
> You cannot tell when the browser closes, there are many hacks, but none are
> foolproof.
> If you maintain a session object (your own, with state info) and if they
> need to identify themselves somehow, you can restart an old session, or
> invalidate it.
> If you are tracking anonymous users, you are out of luck. You could try and
> set a long lived cookie, but they might have cookies off, which is a default
> for AOL users.
>
> Thor HW
> ----- Original Message -----
> From: kavitha ramasamy <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, December 03, 1999 12:23 PM
> Subject: Re: [Session tracking]
>
>
> > The value unBound is called only at two places
> > 1)when I am reloading the same session
> > 2)when the session expires.
> >
> > My problem is if the user closed the browser window , I need to release
> the
> > resource relevant to that session which I created at the time of opening.
> >
> > I cannot even invalidate my previous session because the intention of this
> > work is to prevent multisession on the same user.
> > If the user had a session, he cannot opened the next session.so the
> resource
> > should be released once the browser closed(clint exit)
> >
> > Thanks and Regards
> > kavitha
> >
> >
> > >
> > >Make your session resource class "implements HttpSessionBindingListener"
> > >
> > >and have the valueUnbound do your cleanup.
> > > public void valueUnbound (HttpSessionBindingEvent event){
> > > // Clean up everything in this session
> > > // save or rollback changes, etc.
> > > destroy();
> > > }
> > >
> > >You can read the Javadoc on HttpSessionBindingListener for details.
> > >
> > >Thor HW
> > >
> > >----- Original Message -----
> > >From: Pankaj <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >Sent: Friday, December 03, 1999 8:41 AM
> > >Subject: Re: [Session tracking]
> > >
> > >
> > > > kavitha ,
> > > >
> > > > if you search the list archives for last month you will find out a
> long
> > > > discussion of this same problem which states under the subject
> "Browser
> > > > shutdown..." that there is no guaranteed way of knowing that client is
> > >no
> > >more
> > > > interested in using your site. Please search the archives for the
> same.
> > > >
> > > > Pankaj.
> > > >
> > > > kavitha ramasamy <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > I am designing that user login system, where same user cannot make
> > > > multiple sessions(multiple entries with the same name). When a
> > >particular
> > > > user is making a session, the user information is logged into the
> table
> > >and
> > > > released from the tablewhen the user closed the session.
> > > >
> > > > Here if the user close the system(prpoer logout of the system),then it
> > >is
> > > > releasing all resources,woking fine.
> > > >
> > > > Once the user made the session, if he close the browser window(not
> > >proper
> > > > logout), I need to release the resources (session is still there)
> before
> > > > session time out.
> > > >
> > > > How can I release the resources if the user closes the browser window
> > > > before the session time out.
> > > >
> > > > Any help will be greatly appreciated
> > > > Thanks
> > > > kavitha
> > > >
> > > >
> > > > ______________________________________________________
> > > > Get Your Private, Free Email at http://www.hotmail.com
> > > >
> > > >
> >
> >___________________________________________________________________________
> > > > 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
> >
> > ______________________________________________________
> > Get Your Private, Free Email at http://www.hotmail.com
> >
> >
> ___________________________________________________________________________
> > 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