struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oguz Kologlu <>
Subject Re: Ending session
Date Tue, 05 Jun 2007 14:55:51 GMT
I think the way it is mostly done is by using push events from the  
server. Have a look at Mortbay Jetty servlet container if you are  
really interested, It's supposed to handle continuations/push events  
quite well. If you can no longer push server events out you could  
make the assumption the client has disconnected.

Greg Wilkins had a video on it not too long ago that was interesting  
- you should be able to find it on google easily. He's been working  
on the whole connection scalability issue for quite some time ( I  
think he had some experimental java.nio stuff back in v5.0).

Overall though, I agree you can't reliably trust the browser to  
notify you of the end of session.


On 06/06/2007, at 12:42 AM, Roger Varley wrote:

>> Roger Varley wrote:
>> > I'm sure that I've read that it's possible, using Javascript, to
>> > detect if a client closes the browser & if that's true, then you  
>> could
>> > use an AJAX call to invalidate the session.
>> This is possible, but you can't bet on it actually working. The user
>> might have javascript disabled, or the browser may not fire  
>> javascript
>> events as it's closing itself entirely (instead of just closing one
>> window, for instance).
>> Basically, the only reliable way to destroy a session is to wait  
>> for it
>> to time out (unless the user explicitly logs out, of course).
> I would not disagree with this. However, you have to suspect that the
> majority of clients don't have Javascript turned off, otherwise Ajax
> wouldn't be the current favourite technology. :-)
> Regards
> Roger
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message