Author: markt
Date: Sun Oct 31 13:11:55 2010
New Revision: 1029330

URL: http://svn.apache.org/viewvc?rev=1029330&view=rev
Log:
Parallel deployment
Start to separate context.name and context.path
Currently name==path but eventually name may include a version element but path 
will not.

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1029330&r1=1029329&r2=1029330&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Sun Oct 31 
13:11:55 2010
@@ -325,6 +325,12 @@ public class StandardContext extends Con
     
 
     /**
+     * Unencoded path for this web application.
+     */
+    private String path = null;
+
+
+    /**
      * The "follow standard delegation model" flag that will be used to
      * configure our ClassLoader.
      */
@@ -924,13 +930,6 @@ public class StandardContext extends Con
     }
 
 
-    @Override
-    public void setName( String name ) {
-        super.setName( name );
-        encodedPath = urlEncoder.encode(name);
-    }
-
-
     /**
      * Is caching allowed ?
      */
@@ -1870,25 +1869,22 @@ public class StandardContext extends Con
      */
     @Override
     public String getPath() {
-
-        return (getName());
-
+        return (path);
     }
 
     
     /**
      * Set the context path for this Context.
-     * <p>
-     * <b>IMPLEMENTATION NOTE</b>:  The context path is used as the "name" of
-     * a Context, because it must be unique.
-     *
+     * 
      * @param path The new context path
      */
     @Override
     public void setPath(String path) {
-
-        setName(path);
-
+        this.path = path;
+        encodedPath = urlEncoder.encode(path);
+        if (getName() == null) {
+            setName(path);
+        }
     }
 
 



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

Reply via email to