tomcat 设置会话超时
2017-04-24 10:54
323 查看
1、为单个WEB设置SESSION
在web.xml中添加
xml 代码
[html] view
plain copy
<session-config>
<session-timeout>15</session-timeout>//单位为分钟
</session-config>
2、为单个Servlet指定会话超时时间
在web.xml中添加
xml 代码
[html] view
plain copy
<servlet>
<servlet-name>Servlet名称</servlet-name>
<servlet-class>Servlet类路径</servlet-class>
<init-param>
<param-name>timeout</param-name>
<param-value>600</param-value>
</init-param>
</servlet>
当Servlet与默认时间不同且大于-2时,以Servlet时间为准
3、为所有WEB设置SESSION
在本地 tomcat 目录下conf\web.xml中添加
xml 代码
[html] view
plain copy
<session-config>
<session-timeout>15</session-timeout>//单位为分钟
</session-config>
在web.xml中添加
xml 代码
[html] view
plain copy
<session-config>
<session-timeout>15</session-timeout>//单位为分钟
</session-config>
2、为单个Servlet指定会话超时时间
在web.xml中添加
xml 代码
[html] view
plain copy
<servlet>
<servlet-name>Servlet名称</servlet-name>
<servlet-class>Servlet类路径</servlet-class>
<init-param>
<param-name>timeout</param-name>
<param-value>600</param-value>
</init-param>
</servlet>
当Servlet与默认时间不同且大于-2时,以Servlet时间为准
3、为所有WEB设置SESSION
在本地 tomcat 目录下conf\web.xml中添加
xml 代码
[html] view
plain copy
<session-config>
<session-timeout>15</session-timeout>//单位为分钟
</session-config>
相关文章推荐
- tomcat 会话超时设置
- tomcat 会话超时设置
- 基于Tomcat中间件的系统会话超时设置
- tomcat 会话超时设置
- tomcat 会话超时设置
- Eclipse系列: Eclipse设置Tomcat启动超时时间
- 服务器上传,时间超时 tomcat 如何设置保持连接
- Tomcat设置session超时的几种方式
- Tomcat 中会话超时的相关配置
- tomcat能正常start启动,debug模式时,加载到某个类的时候不动了,一直不动,最后超时了,设置了timeout也没用
- 服务器上传,时间超时 tomcat 如何设置保持连接
- websphere中的会话超时设置 和 web应用中web.xml中session-timeout关系
- Apache+Tomcat负载均衡两种session共享方式的设置之二复制会话
- Tomcat会话超时时如何记录操作日志,满足安全审计要求
- 设置 TOMCAT 请求超时时间
- Tomcat会话断开时间设置
- HTTP Session 会话超时周期的设置方法 和 判断方法
- PHP设置会话(Session)超时过期时间实现登录时间限制
- tomcat连接超时设置,EclispeMarket超时
- Apache+Tomcat负载均衡两种session共享方式的设置之二复制会话