How to set the session timeout
Published in
1 min readNov 22, 2011
- add to all sessions
install the grails templates so you can edit the web.xml file:
grails install-templates
add to src/templates/war/web.xml
<session-config><session-timeout>600</session-timeout></session-config>
the value is in minutes.
2. programmatically to a specific session/user:
add in the controller code:
def sec = 3600 // 1 Hour in seconds
session.setMaxInactiveInterval(sec);
restart the server…