Solved

Controlling of the session time out.

Posted on 2006-06-20
3
185 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Help with LDAp login using jsp 6 120
session bean client machine 9 68
ejb on wildfly 5 61
maven not picking latest jar instead picking old jar from .m2 12 74
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
The goal of this blog is: - To define the incident management process - To go over the key elements of an incident management system - To look into incident alert management tools that integrate with ConnectWise.

739 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