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
Post a Comment