Use STRICT_SERVLET_COMPLIANCE to override the default for ACTIVITY_CHECK to align...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 6 Jun 2010 17:36:34 +0000 (17:36 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 6 Jun 2010 17:36:34 +0000 (17:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@951909 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/session/StandardSession.java
webapps/docs/config/systemprops.xml

index 40a955d..0d3e30f 100644 (file)
@@ -84,14 +84,28 @@ import org.apache.catalina.security.SecurityUtil;
 public class StandardSession
     implements HttpSession, Session, Serializable {
 
+    protected static final boolean STRICT_SERVLET_COMPLIANCE;
 
-    protected static final boolean ACTIVITY_CHECK = 
-        Globals.STRICT_SERVLET_COMPLIANCE
-        || Boolean.valueOf(System.getProperty("org.apache.catalina.session.StandardSession.ACTIVITY_CHECK", "false")).booleanValue();
+    protected static final boolean ACTIVITY_CHECK;
 
 
     // ----------------------------------------------------------- Constructors
 
+    static {
+        STRICT_SERVLET_COMPLIANCE = Boolean.valueOf(System.getProperty(
+                "org.apache.catalina.STRICT_SERVLET_COMPLIANCE",
+                "false")).booleanValue();
+        
+        String activityCheck = System.getProperty(
+                "org.apache.catalina.session.StandardSession.ACTIVITY_CHECK");
+        if (activityCheck == null) {
+            ACTIVITY_CHECK = STRICT_SERVLET_COMPLIANCE;
+        } else {
+            ACTIVITY_CHECK =
+                Boolean.valueOf(activityCheck).booleanValue();
+        }
+    }
+    
 
     /**
      * Construct a new Session associated with the specified Manager.
index 2eaac8a..5e7ce12 100644 (file)
       <li>
         The default value will be changed for:
         <ul>
+        <li><code>org.apache.catalina.session.StandardSession.ACTIVITY_CHECK</code></li>
         <li><code>org.apache.tomcat.util.http.ServerCookie.ALWAYS_ADD_EXPIRES</code>.</li>
         <li><code>org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR</code>.</li>
         <li><code>org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING</code>.</li>
     </property>
 
     <property
-    name="org.apache.catalina.session. StandardSession.ACTIVITY_CHECK">
-      <p>If this is <code>true</code> or if
-      <code>org.apache.catalina.STRICT_SERVLET_COMPLIANCE</code> is
-      <code>true</code> Tomcat will track the number of active requests for each
-      session. When determining if a session is valid, any session with at least
-      one active request will always be considered valid. If not specified, the
-      default value of <code>false</code> will be used.</p>
-    </property>
-
-    <property
     name="org.apache.tomcat.util.http. ServerCookie.ALLOW_EQUALS_IN_VALUE">
       <p>If this is <code>true</code> Tomcat will allow <code>=</code>
       characters when parsing unquoted cookie values. If <code>false</code>,
       <code>JSESSIONIDSSO</code>.</p>
     </property>
     
+    <property
+    name="org.apache.catalina.session. StandardSession.ACTIVITY_CHECK">
+      <p>If this is <code>true</code> Tomcat will track the number of active
+      requests for each session. When determining if a session is valid, any
+      session with at least one active request will always be considered valid.
+      If <code>org.apache.catalina.STRICT_SERVLET_COMPLIANCE</code> is set to
+      <code>true</code>, the default of this setting will be <code>true</code>,
+      else the default value will be <code>false</code>.</p>
+    </property>
+
   </properties>
 
 </section>