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:-
grails install-templates
Then we need to modify “src/templates/war/web.xml” and set session timeout as per requirement after servlet-mapping;
<session-config> <session-timeout>45</session-timeout> </session-config>
The value that you set in the session-timeout is in minutes. Now run application and check, it will work fine.
Hi there, how about grails 2.4.x? Since install-templates is not recommended now. See http://grails.org/doc/latest/guide/upgradingFrom23.html. (Changes to web.xml part).
Any good idea?
Thank you so much.