Sometimes we need to change the session timeout in our grails application.to set session time out we need web.xml,initially that is not available in our application. Firstly we run command:-
Then we need to modify “src/templates/war/web.xml” and set session timeout as per requirement after servlet-mapping;
&lt;session-config&gt; &lt;session-timeout&gt;45&lt;/session-timeout&gt; &lt;/session-config&gt;
The value that you set in the session-timeout is in minutes. Now run application and check, it will work fine.