Tomcat Session Timeout web.xml

前端 未结 4 624
日久生厌
日久生厌 2021-01-01 23:50

This is my web.xml file, it is located in WEB-INF/lib. It specifies session timeout at 1 minute, however it does not time the user out after 1 minute of activit

4条回答
  •  忘掉有多难
    2021-01-02 00:32

    Session timeout hierarchy:

    • TOMCAT_HOME/conf/web.xml
    • WebApplication/webapp/WEB-INF/web.xml
    • Hardcoding your session timeout in Java : HttpSession.setMaxInactiveInterval(int)

    The order of the session timeout configuration:

    HttpSession.setMaxInactiveInterval(int) > $WebApplication/webapp/WEB-INF/web.xml > $TOMCAT_HOME/conf/web.xml

    Each subsequent entry overrides the above configuration.

    Best regards.

提交回复
热议问题