It depends on which web container you use in Geronimo; Both Tomcat and Jetty are supported.
Tomcat
Add the context.xml file to your application or add these nodes:
<Context><Manager className="org.apache.catalina.session.StandardManager" pathname=""></Manager></Context>
From tomcat docs for path name: Restart redirection can be disabled by setting this attribute to an empty string.
Properties are explained at these links:
https://cwiki.apache.org/GMOxDOC22/configuring-session-manager-of-tomcat.html
http://tomcat.apache.org/tomcat-6.0-doc/config/manager.html#Standard_Implementation
Jetty
This container does not save sessions by default, so you have nothing to do but make sure that SessionHandler is not enabled. Remove sessionHandler node if it exists in your context configuration.
<Set name="sessionHandler"> <New class="org.eclipse.jetty.servlet.SessionHandler"> <Arg> <New class="org.eclipse.jetty.servlet.HashSessionManager"> <Set name="storeDirectory">your/chosen/directory/goes/here</Set> </New> </Arg> </New></Set>
Information link:
http://wiki.eclipse.org/Jetty/Howto/Persisting_Sessions
source share