Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45951
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 6 Oct 2008 18:25:55 +0000 (18:25 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 6 Oct 2008 18:25:55 +0000 (18:25 +0000)
Based on jfclere's patch

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@702219 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/Globals.java
java/org/apache/catalina/authenticator/Constants.java
java/org/apache/jasper/Constants.java
webapps/docs/config/systemprops.xml

index 39dfb52..597113c 100644 (file)
@@ -269,14 +269,18 @@ public final class Globals {
      * The name of the cookie used to pass the session identifier back
      * and forth with the client.
      */
-    public static final String SESSION_COOKIE_NAME = "JSESSIONID";
+    public static final String SESSION_COOKIE_NAME =
+        System.getProperty("org.apache.catalina.SESSION_COOKIE_NAME",
+                "JSESSIONID");
 
 
     /**
      * The name of the path parameter used to pass the session identifier
      * back and forth with the client.
      */
-    public static final String SESSION_PARAMETER_NAME = "jsessionid";
+    public static final String SESSION_PARAMETER_NAME =
+        System.getProperty("org.apache.catalina.SESSION_PARAMETER_NAME",
+                "jsessionid");
 
 
     /**
index 4cf47ba..23f3fce 100644 (file)
@@ -40,7 +40,10 @@ public class Constants {
     public static final String FORM_USERNAME = "j_username";
 
     // Cookie name for single sign on support
-    public static final String SINGLE_SIGN_ON_COOKIE = "JSESSIONIDSSO";
+    public static final String SINGLE_SIGN_ON_COOKIE =
+        System.getProperty(
+                "org.apache.catalina.authenticator.Constants.SSO_SESSION_COOKIE_NAME",
+                "JSESSIONIDSSO");
 
 
     // --------------------------------------------------------- Request Notes
index 4ce5bcd..66de25d 100644 (file)
@@ -193,6 +193,8 @@ public class Constants {
      * The name of the path parameter used to pass the session identifier
      * back and forth with the client.
      */
-    public static final String SESSION_PARAMETER_NAME = "jsessionid";
+    public static final String SESSION_PARAMETER_NAME =
+        System.getProperty("org.apache.catalina.SESSION_PARAMETER_NAME",
+                "jsessionid");
 
 }
index a792ae9..41bb7c5 100644 (file)
 </section>
 
 
+<section name="Sessions">
+
+  <properties>
+
+    <property name="org.apache.catalina.SESSION_COOKIE_NAME">
+      <p>An alternative name for the session cookie. Defaults to
+      <code>JSESSIONID</code>. Note that the Servlet specification requires
+      this to be <code>JSESSIONID</code>. You should not rely on being able to
+      change this.</p>
+    </property>
+
+    <property name="org.apache.catalina.SESSION_PARAMETER_NAME">
+      <p>An alternative name for the session path parameter. Defaults to
+      <code>jsessionid</code>. Note that the Servlet specification requires
+      this to be <code>jsessionid</code>. You should not rely on being able to
+      change this.</p>
+    </property>
+
+    <property name="org.apache.catalina.SSO_SESSION_COOKIE_NAME">
+      <p>An alternative name for the single sign on session cookie. Defaults to
+      <code>JSESSIONIDSSO</code>.</p>
+    </property>
+    
+  </properties>
+
+</section>
+
+
 <section name="Other">
 
   <properties>