Setting Session Timeout in Grails Application

Sometimes we need to change the session timeout in our grails set session time out we need web.xml,initially that is not available in our application. Firstly we run command:-

 grails install-templates 

Then we need to modify “src/templates/war/web.xml” and set session timeout as per requirement after servlet-mapping;


The value that you set in the session-timeout is in minutes. Now run application and check, it will work fine.