Java EE中的会话超时 [英] Session timeout in Java EE
问题描述
在哪些方面可以在Java EE中定义会话超时的时间?我正在寻找超越明显的方法,例如在web.xml或HttpSession.setMaxInactiveInterval()中设置会话超时。
In which ways the time for session timeout can be defined in Java EE? I am looking beyond obvious ways, such as setting session timeout in web.xml or HttpSession.setMaxInactiveInterval().
我目前正在审查Java EE应用程序,但我找不到与会话超时定义相关的任何内容。 Web应用程序位于Weblogic中。我假设由于没有会话超时定义,会话将永不过期。
I am currently reviewing a Java EE application, but I can't find anything related to session timeout definition. The web app is in Weblogic. I am assuming that since there is no session timeout definition, the session will never expire.
推荐答案
当您正在寻找如何在Weblogic中超时的会话时,我可以添加
As you're looking for how the session can be timed out in Weblogic, I can add
TimeoutSecs
在 weblogic.xml
中或检查会话中代码中的任何一点在注销时被 session.invalidate()
杀死。
TimeoutSecs
in weblogic.xml
or check for any point in the code where session is killed by session.invalidate()
on logout.
顺便说一句,它不会是无限的。
By the way, it will not be infinite.
在Weblogic上,web.xml中的默认值(如果没有指定值)是使用weblogic中的 TimeoutSecs
值.xml,默认为3600秒,即60分钟
On Weblogic, the default in web.xml (if no value specified) is to use the TimeoutSecs
value in weblogic.xml, which defaults to 3600 secs i.e. 60 mins
这篇关于Java EE中的会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!