Solved

Controlling of the session time out.

Posted on 2006-06-20
3
181 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Exception creating bean of class 5 166
org.apache.jasper.JasperException: using jstl in jsp embedded jetty 13 547
maven j2ee examles 2 49
spring JDBC Template example error 26 207
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
A customer recently asked me about anti-malware and the different deployment options available for his business. Daily news about cyberattacks, zero-day vulnerabilities, and companies that suffered a security breach made him wonder if the endpoint a…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

911 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

16 Experts available now in Live!

Get 1:1 Help Now