tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Morelock <subscripti...@phillipmorelock.com>
Subject Re: Listing all currently logged users
Date Tue, 28 May 2002 16:48:55 GMT
You should really use the lifecycle listener approach and roll your own
hashtable- or list-based implementation, depending on your needs.  Going for
the internals is cool, but it is a non-portable hack.

HttpSessionListener is the way to go, IMHO.

fillup


On 5/27/02 3:13 PM, "Mats Nyberg" <mn@tim.se> wrote:

> not beeing the expert I'd take any suitable Realm-interceptor (e.g.*
> org.apache.tomcat.request.SimpleRealm*,
> or whatever you use depending on your source of userdata).
> 
> I'd subclass it only to maintain a list of people logging in. should be
> done in a jiffy, eh ;)
> 
> ~mats
> 
> 
> Ben Walding wrote:
> 
>> I'm not sure if this is the best way, but I added a
>> HttpSessionListener to find out when
>> sessions were created / destroyed and just maintained a list.
>> 
>> It is probably more portable than hacking your way into Catalina
>> internals.
>> 
>> See the servlet spec for details on lifecycle listeners.
>> 
>> Terrence Szeto wrote:
>> 
>>> 
>>> Is it possible to list all the users who are currently logged in?
>>> 
>>> I'm using FORM authentication with a JDBC Realm.
>>> 
>>> Basically what I want is for users to be able to see who's currently
>>> online (other users).
>>> 
>>> Is there a simple way of approaching this?
>>> and if I were to have to write something for myself, to say, keep
>>> track of all the users who logged in, is there an event which is
>>> fired when a user's session is invalidated so I remove him from a
>>> master "logged-in" user list?
>>> 
>>> 
>>> Thanks for your help everyone..
>>> 
>>> 
>>> Terrence Szeto
>>> Cybermation Web Architect
>>> 
>>> _________________________________________________________________
>>> Join the world's largest e-mail service with MSN Hotmail.
>>> http://www.hotmail.com
>>> 
>>> 
>>> -- 
>>> To unsubscribe, e-mail:
>>> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <mailto:tomcat-user-help@jakarta.apache.org>
>>> 
>>> 
>> 
>> 
>> 
>> 
>> -- 
>> To unsubscribe, e-mail:
>> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail:
>> <mailto:tomcat-user-help@jakarta.apache.org>
>> 
>> 
>> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message