【问题标题】:Session Timeout(session.setMaxInactiveInterval) is not working in Google Appengine会话超时(session.setMaxInactiveInterval)在 Google Appengine 中不起作用
【发布时间】:2014-11-06 08:59:45
【问题描述】:

我尝试使用 session.setMaxInactiveInterval(30*60) 30 minutes 为特定用户设置会话超时。但默认情况下,它分配给 86400 秒(24 小时)。

也在Web.xml中试过

<session-config>
  <session-timeout>30</session-timeout> // Session timeout assigned for all the users
</session-config>

【问题讨论】:

    标签: java google-app-engine session jakarta-ee session-timeout


    【解决方案1】:

    看起来HttpSession.setMaxInactiveInterval() 不再受到 AppEngine 平台的认可(它在过去有效)。

    您仍然可以在web.xml 中指定会话超时:

    <session-config>
        <session-timeout>30</session-timeout>  <!-- 30 min --> 
    </session-config>
    

    【讨论】:

    • 是的,如果我像这样在 web.xml 中进行配置,它将起作用。但它会为所有用户设置,我不希望这样。
    猜你喜欢
    • 2014-01-30
    • 2014-12-05
    • 1970-01-01
    • 2016-01-21
    • 2015-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-12
    相关资源
    最近更新 更多