remm        01/06/12 19:32:02

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  - Make the naming context name really unique.
    Before, there were conflicts when using multiple engines with the same
    host and context names.
    Note : The URL generation in the resources should be modified too, otherwise
    there could be clashes between JARs residing in different engines.
  
  Revision  Changes    Path
  1.62      +13 -5     
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- StandardContext.java      2001/06/11 22:44:15     1.61
  +++ StandardContext.java      2001/06/13 02:32:01     1.62
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.61 2001/06/11 22:44:15 remm Exp $
  - * $Revision: 1.61 $
  - * $Date: 2001/06/11 22:44:15 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.62 2001/06/13 02:32:01 remm Exp $
  + * $Revision: 1.62 $
  + * $Date: 2001/06/13 02:32:01 $
    *
    * ====================================================================
    *
  @@ -141,7 +141,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.61 $ $Date: 2001/06/11 22:44:15 $
  + * @version $Revision: 1.62 $ $Date: 2001/06/13 02:32:01 $
    */
   
   public class StandardContext
  @@ -1191,6 +1191,7 @@
                       (sm.getString("standardContext.wrapper.error", jspFile));
               }
           }
  +
        super.addChild(child);
   
       }
  @@ -3632,7 +3633,14 @@
       private String getNamingContextName() {
           Container parent = getParent();
           if (parent != null) {
  -            return  "/" + parent.getName() + getName();
  +            StringBuffer buf = new StringBuffer();
  +            buf.append("/").append(parent.getName()).append(getName());
  +            parent = parent.getParent();
  +            while (parent != null) {
  +                buf.append("/").append(parent.getName());
  +                parent = parent.getParent();
  +            }
  +            return buf.toString();
           } else {
               return getName();
           }
  
  
  

Reply via email to