Your assumption is incorrect. When the session is created it will follow the value set 
in your web.xml but in this case, after session creation you modify its timeout 
attribute to be higher. This will only apply to sessions that go through this servlet, 
obviously.

Ta
Matt

-----Original Message-----
From: Stephen Charles Huey [mailto:[EMAIL PROTECTED]
Sent: 15 July 2004 22:44
To: Tomcat User
Subject: session timeout: web.xml and setMaxInactiveInterval(int)


My web.xml has the following:

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>


However, when a user logs in, the following code in our app gets
executed:

      HttpSession session = request.getSession(false);
      session.setMaxInactiveInterval(7200);


I've been fiddling with the web.xml and didn't realize that other code
was in there, and I'm wondering who trumps who.  I would assume that the
web.xml's global setting would have priority over any individual
setting, but it could easily be the other way around!  

Thanks,
Stephen

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to