You could use an application context listener to write out the sessions when the context is shutdown and reread them when it starts up.
I tried to work out how the manager application (part of the distribution) worked (as it knows about sessions), but gave up as it looked like to much work and too much poking about inside tomcat. for my tastes (which didn't include Mark O'Driscoll wrote: >I am trying to keep track of the current sessions that are active in my web >application. > >I have a HttpSessionListener that is correctly called on >sessionCreated/sessionDeleted. I keep a reference to each session in the >servletContext as a Vector. > >If tomcat is restarted then the sessions are persisted fine. However my >vector of sessions is lost so I have no record of sessions that were created >during a previous tomcat run. > >Any idea how I could find or keep the list of previously created sessions? > >Is there any way I can find a list of the current sessions without keeping a >list (that would be my preference) > >TIA > >- Mark > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
