remm        01/12/02 09:38:18

  Modified:    catalina/src/share/org/apache/catalina/core Tag:
                        tomcat_40_branch StandardContext.java
  Log:
  - Port patch which makes the parent class loader of a privileged webapp be
    the Catalina loader, which gives it full access to the Catalina internals.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.78.2.8  +13 -7     
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.78.2.7
  retrieving revision 1.78.2.8
  diff -u -r1.78.2.7 -r1.78.2.8
  --- StandardContext.java      2001/11/17 08:42:54     1.78.2.7
  +++ StandardContext.java      2001/12/02 17:38:17     1.78.2.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.78.2.7 2001/11/17 08:42:54 remm Exp $
  - * $Revision: 1.78.2.7 $
  - * $Date: 2001/11/17 08:42:54 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
 1.78.2.8 2001/12/02 17:38:17 remm Exp $
  + * $Revision: 1.78.2.8 $
  + * $Date: 2001/12/02 17:38:17 $
    *
    * ====================================================================
    *
  @@ -142,7 +142,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.78.2.7 $ $Date: 2001/11/17 08:42:54 $
  + * @version $Revision: 1.78.2.8 $ $Date: 2001/12/02 17:38:17 $
    */
   
   public class StandardContext
  @@ -3307,9 +3307,15 @@
               }
           }
           if (getLoader() == null) {      // (2) Required by Manager
  -            if (debug >= 1)
  -                log("Configuring default Loader");
  -            setLoader(new WebappLoader(getParentClassLoader()));
  +            if (getPrivileged()) {
  +                if (debug >= 1)
  +                    log("Configuring privileged default Loader");
  +                setLoader(new WebappLoader(this.getClass().getClassLoader()));
  +            } else {
  +                if (debug >= 1)
  +                    log("Configuring non-privileged default Loader");
  +                setLoader(new WebappLoader(getParentClassLoader()));
  +            }
           }
           if (getManager() == null) {     // (3) After prerequisites
               if (debug >= 1)
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to