默认为30分钟
共有两种方式:
session.setMaxInactiveInterval(10);单位为秒
在web.xml中
<session-config> <session-timeout> 10 //单位是分钟 </session-timeout> </session-config>
本文出自 “IT菜鸟” 博客,请务必保留此出处http://mazongfei.blog.51cto.com/3174958/1894035
原文:http://mazongfei.blog.51cto.com/3174958/1894035