You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Bob Byron <bb...@radit.com> on 1999/11/23 00:39:20 UTC

Sessions under Tomcat.

Does anyone have a JSP file that shows the current Tomcat sessions?  Seems like that should be something included under the examples page.  Or, is that already available somewhere?  Is that type of data accessible from a JavaServer Page?

Bob Byron
RAD Systems, Inc.
www.radit.com
(972)516-4256


Re: Sessions under Tomcat.

Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Bob Byron wrote:
> 
> Does anyone have a JSP file that shows the current Tomcat sessions?  Seems like 
> that should be something included under the examples page.  Or, is that already 
> available somewhere?  Is that type of data accessible from a JavaServer Page?

The Servlet API to enumerate all active sessions was deprecated in Servlet 2.1
so you can't get to that information unless you use container specific APIs.

-- 
Hans Bergsten		hans@gefionsoftware.com
Gefion Software		http://www.gefionsoftware.com

Re: Sessions under Tomcat.

Posted by "Craig R. McClanahan" <cm...@mytownnet.com>.
Bob Byron wrote:

> Does anyone have a JSP file that shows the current Tomcat sessions?  Seems like that should be something included under the examples page.  Or, is that already available somewhere?  Is that type of data accessible from a JavaServer Page?
>

This information is not available to an application-level component (servlet or JSP page).  It used to be available via the HttpSessionContext class, but this class was deprecated (for valid security reasons) as of the 2.1 servlet API.

Since Tomcat is open source, it would be possible to write a servlet that had access to this stuff via "insider" knowledge, but such a servlet would be specific to Tomcat, and would not be portable.

Craig McClanahan