import org.apache.catalina.Session; that is the Session you will be getting back from findSessions
----- Original Message ----- From: "Simha, Kailas" <[EMAIL PROTECTED]> To: "'Tomcat Users List'" <[EMAIL PROTECTED]> Sent: Thursday, October 02, 2003 12:32 PM Subject: RE: Accessing Sessions in the container This gives me a class cast exception when running ! Thanks ! Kailas Enterprise Web Infrastructure -----Original Message----- From: Filip Hanik [mailto:[EMAIL PROTECTED] Sent: Thursday, October 02, 2003 3:05 PM To: Tomcat Users List Subject: Re: Accessing Sessions in the container put a Valve in your context and you can do all kinds of things there on the invoke you can do StandardManager manager = (StandardManager)request.getContext().getManager(); Session[] sessions = manager.findSessions(); the valve if configured only to one context to so you will only get one manager, ie one webapp Filip ----- Original Message ----- From: "Tim Funk" <[EMAIL PROTECTED]> To: "Tomcat Users List" <[EMAIL PROTECTED]> Sent: Thursday, October 02, 2003 11:56 AM Subject: Re: Accessing Sessions in the container But that restriction can be bypssed by creating a SessionListener to store these sessions yourself in ServletContext scope. Search the archive for more info about this. Doing so can also easily create a memory leak if one is not careful. -Tim Filip Hanik wrote: > prohibited by spec > > Filip > > ----- Original Message ----- > From: "Simha, Kailas" <[EMAIL PROTECTED]> > To: "'Tomcat Users List'" <[EMAIL PROTECTED]> > Sent: Thursday, October 02, 2003 11:50 AM > Subject: Accessing Sessions in the container > > > Hi all, > How would I be able to access/list all the sessions running on a > JVM/Container? Any sample code would be delightfully welcome! Thanks > in advance, Kailas > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
