这取决于您在Geronimo中使用的Web容器; Tomcat和Jetty都受支持.
Tomcat
将context.xml文件添加到您的应用程序或添加以下节点:
<Context><Manager className="org.apache.catalina.session.StandardManager"
pathname=""></Manager></Context>
Run Code Online (Sandbox Code Playgroud)
从tomcat docs for pathname:可以通过将此属性设置为空字符串来禁用重新启动持久性.
这些属性在以下链接中解释:
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
默认情况下,此容器不会保留会话,因此除了确保未启用SessionHandler之外,没有任何操作.如果在您的上下文配置中存在sessionHandler节点,请将其删除.
<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>
Run Code Online (Sandbox Code Playgroud)
信息链接:http:
//wiki.eclipse.org/Jetty/Howto/Persisting_Sessions
| 归档时间: |
|
| 查看次数: |
3251 次 |
| 最近记录: |