tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pid *" <>
Subject Re: Getting detailed list of active sessions for a Context
Date Wed, 22 Dec 2010 09:19:57 GMT
On 22 Dec 2010, at 08:49, "Jean-Noël Colin" <> 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.


> Best regards
> Jean-Noël Colin
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

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

View raw message