Hi James, et al.

Opps - I answered the wrong question. As Thiago writes, you would indeed need to use javascript to periodically fetch something from the server, and in particular something that the servlet engine processes, so that it knows to update the last accessed timestamp on its internal HttpSession object mapping to that browser. A simple AJAX call would do well here - just ping a dummy T3 page or something. Alternatively, use a Frame (perhaps a hidden size 0 Frame) with a body reload - which will work even if the browser doesn't support javascript.

You can then leave the default servlet timeout for sessions, so that if the browser is closed, the session object will eventually timeout and be GCed.

Cheers

Richard

Thiago HP wrote:
On 12/4/07, James Sherwood <[EMAIL PROTECTED]> wrote:
So there is no way to have it last the length of the browser being open?

No way unless you use some Javascript hack that keeps requesting something
to the server. You must remember the nature of HTTP. The browser connects to
the server, receives the answer and the connection is closed. There is
nothing like a browser closing event notification sent to the server.
Thiago



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to