<session-config>
web.xml中这么配置:
session-config包含一个子元素session-timeout.定义web站台中的session参数.
<session-timeout>分钟</session-timeout>
定义这个web站台所有session的有效期限.单位为分钟.
</session-config>
范例:
<session-config>
<session-timeout>20</session-timeout>
</session-config>
如果你都配置了还是不起作用,就直接在使用session时就设置有效时间