Hi, One portable way is to write an HttpSessionListener. Register it in web.xml and have it keep a Map (or another data structure, depending on your needs) of HttpSessions. It would update the list when a session is created and destroyed.
Another way involves more Tomcat-specific code, and is therefore less portable and less desirable. You'd navigate the Tomcat container hierarchy down to the Manager element of your Host, and use its methods like findSessions to do whatever you need. The Manager webapp (not to be confused with the session Manager above) also provides some very elementary session statistics, such as the number of active sessions for every webapp. Yoav Shapira Millennium Research Informatics >-----Original Message----- >From: Zsolt Koppany [mailto:[EMAIL PROTECTED] >Sent: Tuesday, August 17, 2004 3:55 PM >To: Tomcat Users List >Subject: How to figure out the currently existing sessions? > >Hi, > >how can I figure out the currently existing sessions? > >Zsolt > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
