You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kris Gonzalez <ji...@softhome.net> on 2001/04/11 09:10:27 UTC

Re: Session Invalidation

i am unsure if there is a way to do this in pure java, but here's a
javascript solution:

place a javascript function in a universal server-side-include (if you
have a header.jsp which standardizes the header for your page, this is a
perfect place)...then, trigger your function to be called with an
"onUnload=" listener in your page's <body> tag...have your function post
to servlet or jsp which performs your logoff routines...

this is the same trick that porn sites have used for years to lock you
into their site, and though it's not a perfect solution in that
javascript can be turned off, it's likely that most users will have
javascript enabled and will not object as the entire process should be
invisible to them

hope this helps!
-kg


> Lakshmeenarayana G G wrote:
> 
> hi..
> I want to capture the event when my user logsoff or click the 'x'
> button in the top-right corner of browser window.
> How can i do some finalising jobs..like writing to log file about the
> log off events.
> Please help...
> i would really appreciate if i get detailed answers for this.
> 
> Thanks for the time.
> 
> Regards.
> 
> L G Goundalkar
> Intertec Communications Pvt Ltd
> INDIA