【发布时间】:2009-12-04 17:03:29
【问题描述】:
我正在尝试使用 HttpSession.setMaxInactiveInterval 调整会话超时,但它不起作用。
这是我的代码(Groovy),它正在无异常地执行:
def paramValue = WebAttributes.REQUEST.getParameter('maxInactiveSeconds');
println 'paramValue=' + paramValue;
if (paramValue != null) {
def seconds = Integer.parseInt(paramValue);
WebAttributes.REQUEST.getSession().setMaxInactiveInterval(seconds);
}
一些细节:
- Tomcat 6.0.16
- 这发生在与“正常”应用程序分开的 web 应用程序中(即具有可视内容),但我已定义 emptySessionPath="true",因此会话 *应该* 跨 web 应用程序共享
谢谢,
哈鲁斯佩克斯
【问题讨论】:
标签: tomcat jakarta-ee