Session timeout setting of web.xml and several methods of setting session timeout

Session timeout setting of web.xml



Let's talk about the topic first, the session timeout setting of web.xml
<session-config>     
		<session-timeout>30</session-timeout>       
	</session-config>



Other methods of session timeout expansion:
1. Set in tomcat-5.0.28\conf\web.xml
<session-config>  
        <session-timeout>30</session-timeout>  
</session-config>  


2. Set by java code
session.setMaxInactiveInterval(30*60);//in seconds

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326692427&siteId=291194637
Recommended