How to set the session timeout

1. 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. to a specific session/user

add in the controller :

def sec = 3600 // 1 Hour in seconds
session.setMaxInactiveInterval(sec);

restart the server…