Saving a Jetty / Tomcat Session

Where does Tomcat or Jetty save sessions (without a session save configuration)? Does everything go to the file system or remains in memory?

+7
tomcat session jetty
source share
1 answer

Tomcat by default uses StandardManager to manage session data. At run time, this data is not stored in storage and exists only in memory. When you complete Tomcat, it will try to save all the session data in $ TOMCAT_HOME / work / Catalina /// SESSIONS.ser. Tomcat will try to restart this session the next time it starts, and will also delete the SESSIONS.ser file after it starts successfully. If your server freezes or you execute kill -9, the data from this session will be lost.

The documentation for the standard manager is here http://tomcat.apache.org/tomcat-5.5-doc/config/manager.html

I do not know Jetty very well, but Jetty does not have a constant by default, so the sessions are stored in memory. You can enable the save if you want, and its documented here docs.codehaus.org/display/JETTY/Persisting+Sessions.

Hope this helps.

+5
source share

All Articles