开发者

Change Session Timeout during runtime in Struts2

开发者 https://www.devze.com 2023-01-22 15:00 出处:网络
I know that I can set the session timeout in web.xml in the <session-config> section. What I need now is to change this setting dynamically during runtime, i.e. call a method that overrides the

I know that I can set the session timeout in web.xml in the <session-config> section. What I need now is to change this setting dynamically during runtime, i.e. call a method that overrides the web.xml setting if needed.

Any ideas? I found nothin开发者_运维知识库g so far.


Found it! As described in JBoss Session Timeout one can use HttpSession.setMaxInactiveInterval(int seconds).

0

精彩评论

暂无评论...
验证码 换一张
取 消