tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardContext.java
Date Fri, 27 Apr 2001 19:57:40 GMT
remm        01/04/27 12:57:39

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  - Should address bug 1469. There was name conflicts in the
    access controller of the naming context.
  
  Revision  Changes    Path
  1.55      +21 -8     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.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- StandardContext.java	2001/04/17 19:27:14	1.54
  +++ StandardContext.java	2001/04/27 19:57:38	1.55
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
1.54 2001/04/17 19:27:14 craigmcc Exp $
  - * $Revision: 1.54 $
  - * $Date: 2001/04/17 19:27:14 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
1.55 2001/04/27 19:57:38 remm Exp $
  + * $Revision: 1.55 $
  + * $Date: 2001/04/27 19:57:38 $
    *
    * ====================================================================
    *
  @@ -141,7 +141,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.54 $ $Date: 2001/04/17 19:27:14 $
  + * @version $Revision: 1.55 $ $Date: 2001/04/27 19:57:38 $
    */
   
   public class StandardContext
  @@ -3439,13 +3439,13 @@
   
           Hashtable contextEnv = new Hashtable();
           javax.naming.Context namingContext = 
  -            new NamingContext(contextEnv, getName());
  -        ContextAccessController.setSecurityToken(getName(), this);
  +            new NamingContext(contextEnv, getNamingContextName());
  +        ContextAccessController.setSecurityToken(getNamingContextName(), this);
           ContextBindings.bindContext(this, namingContext, this);
           ContextBindings.bindThread(this, this);
   
           // Setting the context in read/write mode
  -        ContextAccessController.setWritable(getName(), this);
  +        ContextAccessController.setWritable(getNamingContextName(), this);
   
           // Creating the comp subcontext
           javax.naming.Context compCtx = namingContext.createSubcontext("comp");
  @@ -3576,7 +3576,7 @@
           }
   
           // Setting the context in read only mode
  -        ContextAccessController.setReadOnly(getName());
  +        ContextAccessController.setReadOnly(getNamingContextName());
   
           ContextBindings.unbindThread(this, this);
   
  @@ -3584,6 +3584,19 @@
           ContextBindings.bindClassLoader
               (this, this, getLoader().getClassLoader());
   
  +    }
  +
  +
  +    /**
  +     * Get naming context full name.
  +     */
  +    private String getNamingContextName() {
  +        Container parent = getParent();
  +        if (parent != null) {
  +            return  "/" + parent.getName() + getName();
  +        } else {
  +            return getName();
  +        }
       }
   
   
  
  
  

Mime
View raw message