I have to test a web application that is written by spring and jsp. The default session-timeout for the application is 30 min.
I want to reduce the session-timeout. For doing this, I have changed in the web.xml
file in tomcatInstallationLocation/conf/
. But it doesn't work. The default configuration in tomcatInstallationLocation/conf/web.xml
was -
<session-config> <session-timeout>30</session-timeout> </session-config>
Where I've just changed the time and make it -
<session-config> <session-timeout>5</session-timeout> </session-config>
But is still doesn't work. As I know far, in this situation I have to make a change in my spring application's web.xml
. But I'm not sure. Can any one help me?
Thanks in advance.
Spring Security Session Timeout In the case of Tomcat we can set the session timeout by configuring the maxInactiveInterval attribute on the manager element in server. xml or using the session-timeout element in web. xml. Note that the first option will affect every app that's deployed to the Tomcat instance.
After deploying the war file manually to tomcat, I realized that default session timeout value (30 min) was being used still.
Session timeout hierarchy:
$tomcat_home/conf/web.xml
$your_webapp/WEB-INF/web.xml
HttpSession.setMaxInactiveInterval(int)
Each subsequent entry overrides others above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With