Solved

Controlling of the session time out.

Posted on 2006-06-20
3
179 Views
Last Modified: 2010-04-01
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.

0
Comment
Question by:spiderman19
  • 2
3 Comments
 
LVL 3

Expert Comment

by:runa_paathak
ID: 16948489
Yes, use HttpSession.setMaxInactiveInterval(int interval)
This "Specifies the time, in seconds, between client requests before the servlet container will invalidate this session."
0
 

Author Comment

by:spiderman19
ID: 16949005
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
 
LVL 3

Accepted Solution

by:
runa_paathak earned 115 total points
ID: 16949074
No it is only for the current session. The interval needs to be given in seconds.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now