I'm trying to adjust the session timeout using HttpSession.setMaxInactiveInterval and it's not working.
Here is my code (Groovy), which is executing without exceptions:
def paramValue = WebAttributes.REQUEST.getParameter('maxInactiveSeconds');
println 'paramValue=' + paramValue;
if (paramValue != null) {
def seconds = Integer.parseInt(paramValue);
WebAttributes.REQUEST.getSession().setMaxInactiveInterval(seconds);
}
Some details:
- Tomcat 6.0.16
- This is happening in a webapp separate from the 'normal' one (i.e. with visual content), but I have defined emptySessionPath="true" so the session *should* be shared across webapps
thanks,
haruspex