You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/07/10 21:33:04 UTC

DO NOT REPLY [Bug 10656] - Session Timeout incorrect for 0 in web.xml

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10656>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10656

Session Timeout incorrect for 0 in web.xml





------- Additional Comments From bob@jadn.com  2002-07-10 19:33 -------

True, and page 222 of Servlet 2.3 says that Session.getMaxInactiveInterval() 
must return a negative to indicate that the session never times out. So I
propose this patch to fix both problems.

Index: ManagerBase.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/ManagerBase.java,v
retrieving revision 1.11
diff -u -r1.11 ManagerBase.java
--- ManagerBase.java	14 Jan 2002 23:38:03 -0000	1.11
+++ ManagerBase.java	10 Jul 2002 19:27:58 -0000
@@ -397,11 +397,14 @@
 
     /**
      * Set the default maximum inactive interval (in seconds)
-     * for Sessions created by this Manager.
+     * for Sessions created by this Manager.  -1 means never timeout
      *
      * @param interval The new default value
      */
     public void setMaxInactiveInterval(int interval) {
+
+
if ( interval == 0 )
+
    interval = -1;
 
         int oldMaxInactiveInterval = this.maxInactiveInterval;
         this.maxInactiveInterval = interval;

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>