Grails. Ways to set the timeout interval of a session. Which better? -


i know 2 ways set timeout interval of session:

way 1:

grails install-templates 

then edit src/templates/war/web.xml

way 2:

write line of code in controller:

session.setmaxinactiveinterval(sec); 

which of these ways think better - , why?

changing value in web.xml best if want constant value sessions.

setmaxinactiveinterval useful when want programmatically determine current session's max length, it's overkill set value repeatedly same value.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -