SessionTimeout: web.xml vs session.maxInactiveInterval()

后端 未结 2 1996
甜味超标
甜味超标 2020-11-27 12:30

I\'m trying to timeout an HttpSession in Java. My container is WebLogic.

Currently, we have our session timeout set in the web.xml file, like this

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 13:03

    Now, i'm being told that this will terminate the session (or is it all sessions?) in the 15th minute of use, regardless their activity.

    No, that's not true. The session-timeout configures a per session timeout in case of inactivity.

    Are these methods equivalent? Should I favour the web.xml config?

    The setting in the web.xml is global, it applies to all sessions of a given context. Programatically, you can change this for a particular session.

提交回复
热议问题