File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes session questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "session questions" Watch "session questions" New topic

session questions

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi All
1) is it possible to retrieve an expired session. If yes then how
2) How to get the total count of active sessions.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13036
1. The servlet engine unbinds all attached data as it is invalidating (expiring) a session so it would not do you any good to have one.
2. In Tomcat the management application will list the number of active sessions - or you could use one of the listeners.
Naina Srivastava

Joined: Jun 20, 2002
Posts: 10
Check the following thread too:
Bart Fransen

Joined: Feb 12, 2004
Posts: 4
Hi Manish,
2) has a nice little tutorial on this.
Hope that helps,
I agree. Here's the link:
subject: session questions
It's not a secret anymore!