会话超时(session.setMaxInactiveInterval)在Google Appengine中不起作用 [英] Session Timeout(session.setMaxInactiveInterval) is not working in Google Appengine

查看:158
本文介绍了会话超时(session.setMaxInactiveInterval)在Google Appengine中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



在Web.xml中也尝试过

 < session-config> ; 
< session-timeout> 30< / session-timeout> //为所有用户分配会话超时
< / session-config>


解决方案

HttpSession.setMaxInactiveInterval ()不再受AppEngine平台的支持(它在过去有效)。



然而,您仍然可以在 web.xml

 < session-config> 
< session-timeout> 30< / session-timeout> <! - 30分钟 - >
< / session-config>


I tried to set the Session timeout for particular users using session.setMaxInactiveInterval(30*60) 30 minutes . But by default it's assigned to 86400 seconds (24 hrs).

Also tried in Web.xml

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

解决方案

It looks HttpSession.setMaxInactiveInterval() is not honoured by the AppEngine platform anymore (it worked in the past).

You can however still specify session timeout in the web.xml:

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

这篇关于会话超时(session.setMaxInactiveInterval)在Google Appengine中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆