gpt4 book ai didi

java - session 超时值被覆盖。设置session值的方法有哪些

转载 作者:行者123 更新时间:2023-11-28 22:51:47 25 4
gpt4 key购买 nike

应用程序有

<session-timeout>30</session-timeout>

在 web.xml 中设置。

我改成了

<session-timeout>2</session-timeout>

在所有的 web.xml 文件中。但是,request.getSession().getMaxInactiveInterval() 仍然会返回 30 分钟。

setMaxInactiveInterval(int) 没有在 Java 的任何地方使用。这可以被覆盖的任何其他方式。使用 Tomcat 服务器。

最佳答案

Hybris 已添加配置属性以调整 session 超时。

尝试更改 local.properties 文件中的属性。

default.session.timeout = 120

您可以在 platform/project.properties 文件中检查默认值。

# The default session timeout (in seconds).
# If you specify 0 or less, the session will never timeout
default.session.timeout=3600

关于java - session 超时值被覆盖。设置session值的方法有哪些,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37678277/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com