ApacheTomcat 应用程序的默认会话超时

部署在 Tomcat5.5上的 Web 应用程序的默认会话超时是多少?是浏览器特有的吗?在我的 Web 应用程序中,web.xml和代码中都没有提到默认超时。

160148 次浏览

Define inside web.xml

Open $CATALINA_BASE/conf/web.xml and find this:

<!-- ==================== 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. You can override these default settings via your webapp's own web.xml file.

This is actually from my Tomcat 7 (Windows) but I think Tomcat 5.5's configuration is not very different