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.
   <session-config>
        <session-timeout>10</session-timeout>
    </session-config>

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?

thanks.

spiderman19Asked:
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.
0
 
runa_paathakCommented:
Yes, use HttpSession.setMaxInactiveInterval(int interval)
This "Specifies the time, in seconds, between client requests before the servlet container will invalidate this session."
0
 
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 ?
0
All Courses

From novice to tech pro — start learning today.