简体   繁体   English

Apache Tomcat 应用程序的默认会话超时

[英]Default session timeout for Apache Tomcat applications

What is the default session timeout for web applications deployed on Tomcat5.5? Tomcat5.5 上部署的 Web 应用程序的默认会话超时时间是多少? Is it browser specific?它是浏览器特定的吗? In my web application, default timeout is mentioned neither in web.xml nor in code.在我的 web 应用程序中, web.xml和代码中都没有提到默认超时。

Open $CATALINA_BASE/conf/web.xml and find this打开$CATALINA_BASE/conf/web.xml并找到这个

<!-- ==================== Default Session Configuration ================= -->
<!-- You can set the default session timeout (in minutes) for all newly   -->
<!-- created sessions by modifying the value below.                       -->

<session-config>
  <session-timeout>30</session-timeout>
</session-config>

all webapps implicitly inherit from this default web descriptor.所有 web 应用程序都隐式继承了这个默认的 web 描述符。 You can override session-config as well as other settings defined there in your web.xml.您可以覆盖 session-config 以及 web.xml 中定义的其他设置。

This is actually from my Tomcat 7 (Windows) but I think 5.5 conf is not very different这实际上来自我的 Tomcat 7 (Windows) 但我认为 5.5 conf 并没有太大的不同

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM