tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r951909 - in /tomcat/trunk: java/org/apache/catalina/session/StandardSession.java webapps/docs/config/systemprops.xml
Date Sun, 06 Jun 2010 17:36:34 GMT
Author: markt
Date: Sun Jun  6 17:36:34 2010
New Revision: 951909

URL: http://svn.apache.org/viewvc?rev=951909&view=rev
Log:
Use STRICT_SERVLET_COMPLIANCE to override the default for ACTIVITY_CHECK to align behaviour
with other system properties

Modified:
    tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
    tomcat/trunk/webapps/docs/config/systemprops.xml

Modified: tomcat/trunk/java/org/apache/catalina/session/StandardSession.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/session/StandardSession.java?rev=951909&r1=951908&r2=951909&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/session/StandardSession.java (original)
+++ tomcat/trunk/java/org/apache/catalina/session/StandardSession.java Sun Jun  6 17:36:34
2010
@@ -84,14 +84,28 @@ import org.apache.catalina.security.Secu
 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.

Modified: tomcat/trunk/webapps/docs/config/systemprops.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/systemprops.xml?rev=951909&r1=951908&r2=951909&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/config/systemprops.xml (original)
+++ tomcat/trunk/webapps/docs/config/systemprops.xml Sun Jun  6 17:36:34 2010
@@ -239,6 +239,7 @@
       <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>
@@ -277,16 +278,6 @@
     </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>,
@@ -352,6 +343,16 @@
       <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>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message