On Tue, Sep 11, 2007 at 11:24:38PM +0200, landry soules wrote:
> Hello,
> 
> I have to display a list of the connected users in a page of my app. I 
> know it sounds definitely dumb, but i don't know how to achieve this...
> Users login to my site (i extended AuthenticatedWebApplication), and 
> then i update a "isConnected" flag in users table.
> Thus i display the connected users in a list view, retrieved by the 
> "isConnected" flag.
> It implies of course that users will use a "logoff" button when they 
> leave, which i don't believe they will do...

Implement an HttpSessionListener that clears the flag when the session
is destroyed, and register it in your web.xml. This will handle both the
case when they press the Logout button and when the session expires due
to inactivity.

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionListener.html

jk

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

Reply via email to