You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frank Zammetti <fz...@hotmail.com> on 2004/06/15 22:38:02 UTC

Enumerating sessions

Hello all... is there any good way to enumerate all sessions under a given 
webapp?  I know there used to be the SessionContext, but that has since been 
deprecated as of servlet spec 2.1 I believe... Is there anything in Struts 
that might help?

Basically I'm just looking for an accurate way to display all currently 
logged on users, and also have the ability to add a session attribute to all 
of them (think broadcast messages and forced graceful logoffs).  I keep 
hearing the term "Session Listenter", but my research is turning up 
server-specific (or third party-specific references), and I need this to be 
server-nuetral.

I could I guess create a wrapper class that is called to create or kill a 
session, as well as to add of remove attributes, but I'd prefer something 
that won't require me to change a lot of code, or any really!

Thanks in advance for any ideas!

Frank

_________________________________________________________________
MSN 9 Dial-up Internet Access fights spam and pop-ups – now 3 months FREE! 
http://join.msn.click-url.com/go/onm00200361ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Enumerating sessions

Posted by Nick Heudecker <ni...@systemmobile.com>.
Wouldn't this do it?

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/servletapi/javax/servlet/http/HttpSessionListener.html

Frank Zammetti wrote:

> Hello all... is there any good way to enumerate all sessions under a 
> given webapp?  I know there used to be the SessionContext, but that has 
> since been deprecated as of servlet spec 2.1 I believe... Is there 
> anything in Struts that might help?
> 
> Basically I'm just looking for an accurate way to display all currently 
> logged on users, and also have the ability to add a session attribute to 
> all of them (think broadcast messages and forced graceful logoffs).  I 
> keep hearing the term "Session Listenter", but my research is turning up 
> server-specific (or third party-specific references), and I need this to 
> be server-nuetral.
> 
> I could I guess create a wrapper class that is called to create or kill 
> a session, as well as to add of remove attributes, but I'd prefer 
> something that won't require me to change a lot of code, or any really!
> 
> Thanks in advance for any ideas!
> 
> Frank
> 
> _________________________________________________________________
> MSN 9 Dial-up Internet Access fights spam and pop-ups – now 3 months 
> FREE! http://join.msn.click-url.com/go/onm00200361ave/direct/01/
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


-- 
Nick Heudecker
System Mobile, Inc.
Email: nick@systemmobile.com
Web: http://www.systemmobile.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org