tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Noël Colin <jean-noel.co...@fundp.ac.be>
Subject Re: Getting detailed list of active sessions for a Context
Date Wed, 22 Dec 2010 10:03:07 GMT
Hi

Thanks for the feedback; actually, jsp or servlet is not really the point, since I'm using
icefaces anyway.

So it seems that I can't get access to the list of sessions connected to my webapp, except
the limited information provided by HttpSession?

Cheers

Jean-Noël

On 22 Dec 2010, at 10:19, Pid * wrote:

> On 22 Dec 2010, at 08:49, "Jean-Noël Colin" <jn.colin@gmail.com> wrote:
> 
>> Hi,
>> 
>> I'm developing a webapp and I would like to be able to display the list of active
sessions for that specific webapp, in a specific page, and I'd like to get a detailed view:
Session Id, Creation time, last activity, IP address, username (in case he's authenticated)
> 
> The below will get you the session details but not the username.
> 
>> 
>> I searched forums and the web, and found the way to get access to the HttSession,
by defining an HttpSessionListener. But I would like to get more info, like what's made available
through the manager interface.
>> 
>> I tried defining a Manager for the context (org.apache.catalina.session.StandardManager
which is the default, btw), but can't find a way to access it from the jsp.
> 
> As you can see from the package name this is an internal tomcat class
> not a servlet spec class.
> 
> The servlet spec is not designed to permit access to the container
> (tomcat) implementation.
> 
>> I also tried casting the HttpSession retrieved in the HttpSessionListener, without
success.
>> 
>> Would you have any further suggestion?
> 
> See PSIProbe and investigate JMX.
> Note: you may wish to perform logic in a Servlet rather than a JSP.
> 
> 
> p
> 
> 
>> 
>> Best regards
>> 
>> Jean-Noël Colin
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message