Controlling of the session time out.

Hi, my application is running on Tomcat Application Server.

i have set my session in the web.xml like shown below.

I am just wondering, can i change this session timeout on the fly, means on run time, user can able to change this time out from 10mins to another setting. Can it be done?


Who is Participating?
runa_paathakConnect With a Mentor Commented:
No it is only for the current session. The interval needs to be given in seconds.
Yes, use HttpSession.setMaxInactiveInterval(int interval)
This "Specifies the time, in seconds, between client requests before the servlet container will invalidate this session."
spiderman19Author Commented:
is this interval is in mins or seconds?

if i change like this, setting the setMacInactionInterval, is that means all the session within the system ( or in the system scope), it'll affec the rest ?
All Courses

From novice to tech pro — start learning today.