tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Tomcat.java
Date Thu, 15 Jun 2000 00:26:51 GMT
costin      00/06/14 17:26:51

  Modified:    .        build.xml
               src/etc  server.xml tomcat.policy
               src/share/org/apache/jasper JspC.java
               src/share/org/apache/jasper/compiler Compiler.java
                        JikesJavaCompiler.java JspCompiler.java
               src/share/org/apache/jasper/runtime JspLoader.java
                        JspServlet.java
               src/share/org/apache/tomcat/core Context.java
                        ContextManager.java
               src/share/org/apache/tomcat/loader AdaptiveClassLoader.java
                        AdaptiveServletLoader.java ClassRepository.java
                        SetSecurityManager.java
               src/share/org/apache/tomcat/request JDBCRealm.java
               src/share/org/apache/tomcat/startup Tomcat.java
  Added:       src/share/org/apache/jasper/runtime JspLoader12.java
               src/share/org/apache/tomcat/loader
                        AdaptiveClassLoader12.java
  Log:
  Fixed the JDK1.1 compiler problem, build.xml and all related files.
  
  Right now it should compile and run fine with JDK1.1 - at least it does for me with 1.1.8
  
  All 1.2 code is confined in modules that can be configured out.
  
  I think the Policy-based security should still work, but I have to test it out
  and verify it. I simplified the configuration and moved everything in modules,
  but I need Glenn to check that and make any adjustments if needed ( now that he's
  a voted commiter :-).
  
  Revision  Changes    Path
  1.50      +10 -0     jakarta-tomcat/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/build.xml,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- build.xml	2000/06/14 19:07:12	1.49
  +++ build.xml	2000/06/15 00:26:40	1.50
  @@ -66,6 +66,16 @@
              deprecation="off" >
              <exclude name="**/Jdk12Interceptor.java" 
                       unless="jdk12.present"/>
  +           <exclude name="**/SetSecurityManager.java" 
  +                    unless="jdk12.present"/>
  +           <exclude name="**/EmbededTomcat.java" 
  +                    unless="jdk12.present"/>
  +           <exclude name="**/PolicyInterceptor.java" 
  +                    unless="jdk12.present"/>
  +           <exclude name="**/JspLoader12.java" 
  +                    unless="jdk12.present"/>
  +           <exclude name="**/AdaptiveClassLoader12.java" 
  +                    unless="jdk12.present"/>
              <exclude name="**/SSLSocketFactory.java"
                       unless="jsse.present" />
        </javac>
  
  
  
  1.23      +6 -1      jakarta-tomcat/src/etc/server.xml
  
  Index: server.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- server.xml	2000/06/14 19:07:17	1.22
  +++ server.xml	2000/06/15 00:26:41	1.23
  @@ -44,8 +44,12 @@
            -->
           
           <ContextInterceptor className="org.apache.tomcat.context.AutoSetup" />
  +
  +        <!-- Uncomment out if you have JDK1.2 and want to use policy 
           <ContextInterceptor 
               className="org.apache.tomcat.context.PolicyInterceptor" />
  +        -->
  +
           <ContextInterceptor 
               className="org.apache.tomcat.context.LoaderInterceptor" />
           <ContextInterceptor 
  @@ -141,7 +145,7 @@
               You can set parameter keystore and keypass if you want 
               to change the default ( user.home/.keystore with changeit )
            -->
  -        
  +        <!--
           <Connector className="org.apache.tomcat.service.PoolTcpConnector">
               <Parameter name="handler" 
                   value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
  @@ -150,6 +154,7 @@
               <Parameter name="socketFactory" 
                   value="org.apache.tomcat.net.SSLSocketFactory" />
           </Connector>
  +        -->
   
           <!-- Apache AJP12 support. This is also used to shut down tomcat.
             -->
  
  
  
  1.4       +2 -2      jakarta-tomcat/src/etc/tomcat.policy
  
  Index: tomcat.policy
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/etc/tomcat.policy,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tomcat.policy	2000/06/14 19:07:17	1.3
  +++ tomcat.policy	2000/06/15 00:26:41	1.4
  @@ -17,9 +17,9 @@
   // By default we grant read access on webapp dir and
   // write in workdir
   grant codeBase "file:${tomcat.home}/webapps/examples" {
  -      permission java.net.SocketPermission "localhost:1024-" "listen";
  +      permission java.net.SocketPermission "localhost:1024-", "listen";
         permission java.util.PropertyPermission "*", "read";
  -}
  +};
   
   // default permissions granted to all domains
   
  
  
  
  1.13      +6 -4      jakarta-tomcat/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- JspC.java	2000/05/26 18:55:10	1.12
  +++ JspC.java	2000/06/15 00:26:42	1.13
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/JspC.java,v 1.12 2000/05/26 18:55:10 costin Exp $
  - * $Revision: 1.12 $
  - * $Date: 2000/05/26 18:55:10 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/JspC.java,v 1.13 2000/06/15 00:26:42 costin Exp $
  + * $Revision: 1.13 $
  + * $Date: 2000/06/15 00:26:42 $
    *
    * ====================================================================
    * 
  @@ -321,7 +321,9 @@
       {
           try {
               JspLoader loader =
  -                    new JspLoader(getClass().getClassLoader(), this);
  +                    new JspLoader();
  +	    loader.setParentClassLoader(getClass().getClassLoader());
  +	    loader.setOptions( this);
               CommandLineContext clctxt = new CommandLineContext(
                       loader, getClassPath(), file, uriBase, uriRoot, false,
                       this);
  
  
  
  1.17      +3 -40     jakarta-tomcat/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Compiler.java	2000/05/26 18:55:12	1.16
  +++ Compiler.java	2000/06/15 00:26:43	1.17
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/Compiler.java,v 1.16 2000/05/26 18:55:12 costin Exp $
  - * $Revision: 1.16 $
  - * $Date: 2000/05/26 18:55:12 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/Compiler.java,v 1.17 2000/06/15 00:26:43 costin Exp $
  + * $Revision: 1.17 $
  + * $Date: 2000/06/15 00:26:43 $
    *
    * ====================================================================
    * 
  @@ -67,7 +67,6 @@
   import java.io.ByteArrayOutputStream;
   import java.io.FileOutputStream;
   
  -import java.security.*;
   import org.apache.jasper.JspCompilationContext;
   import org.apache.jasper.Constants;
   import org.apache.jasper.JasperException;
  @@ -102,42 +101,6 @@
        *         was recompiled. 
        */
       public boolean compile()
  -        throws FileNotFoundException, JasperException, Exception 
  -    {
  -        if( System.getSecurityManager() == null )
  -            return compile_context();
  -        else
  -            return compile_priviledged();
  -    }
  -
  -    /**
  -     * When using a SecurityManager and a JSP page itself triggers
  -     * another JSP due to an errorPage or from a jsp:include,
  -     * the compile must be performed with the Permissions of
  -     * this class using doPriviledged because the parent JSP
  -     * may not have sufficient Permissions.
  -     */
  -    private boolean compile_priviledged()
  -    {
  -
  -        class doInit implements PrivilegedAction {
  -            Boolean result;
  -            public Object run()
  -            {
  -                try {
  -                    result = new Boolean(compile_context());
  -                } catch(Exception ex) {
  -                    return new Boolean(false);
  -                }
  -                return result;
  -            } 
  -        }    
  -        doInit di = new doInit();
  -        Boolean res = (Boolean)AccessController.doPrivileged(di);
  -        return res.booleanValue();
  -    }
  -
  -    private boolean compile_context()
           throws FileNotFoundException, JasperException, Exception 
       {
           String pkgName = mangler.getPackageName();
  
  
  
  1.5       +5 -38     jakarta-tomcat/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java
  
  Index: JikesJavaCompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JikesJavaCompiler.java	2000/05/26 18:55:12	1.4
  +++ JikesJavaCompiler.java	2000/06/15 00:26:43	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v 1.4 2000/05/26 18:55:12 costin Exp $
  - * $Revision: 1.4 $
  - * $Date: 2000/05/26 18:55:12 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JikesJavaCompiler.java,v 1.5 2000/06/15 00:26:43 costin Exp $
  + * $Revision: 1.5 $
  + * $Date: 2000/06/15 00:26:43 $
    *
    * ====================================================================
    *
  @@ -67,8 +67,6 @@
   import java.io.File;
   import java.io.ByteArrayOutputStream;
   
  -import java.security.*;
  -
   /**
     * A Plug-in class for specifying a 'jikes' compile.
     *
  @@ -121,42 +119,11 @@
         this.out = out;
       }
   
  -    /**
  -     * When using a SecurityManager and a JSP page itself triggers
  -     * another JSP due to an errorPage or from a jsp:include,
  -     * the compile must be performed with the Permissions of
  -     * this class using doPriviledged because the parent JSP
  -     * may not have sufficient Permissions.
  -     */
  -    private boolean compile_priviledged(String source) {
  -        class doInit implements PrivilegedAction {
  -            String src;
  -            Boolean result;
  -            public doInit(String source ) {
  -                src = source;
  -            }
  -            public Object run() {
  -                result = new Boolean(compile_source(src));
  -                return result;
  -            }
  -        }
  -        doInit di = new doInit(source);
  -        Boolean res = (Boolean)AccessController.doPrivileged(di);
  -        return res.booleanValue();
  -    }
  -
  -    public boolean compile(String source) {
  -        if( System.getSecurityManager() == null )
  -            return compile_source(source);
  -        else
  -            return compile_priviledged(source);
  -    }
  -
  -    /**
  +   /**
        * Execute the compiler
        * @param source - file name of the source to be compiled
        */ 
  -    private boolean compile_source(String source) {
  +    public boolean compile(String source) {
   	Process p;
   	int exitValue = -1;
   
  
  
  
  1.13      +1 -56     jakarta-tomcat/src/share/org/apache/jasper/compiler/JspCompiler.java
  
  Index: JspCompiler.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspCompiler.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- JspCompiler.java	2000/05/26 18:55:13	1.12
  +++ JspCompiler.java	2000/06/15 00:26:43	1.13
  @@ -58,8 +58,6 @@
   import java.io.File;
   import java.io.FileNotFoundException;
   
  -import java.security.*;
  -
   import org.apache.jasper.JspCompilationContext;
   import org.apache.jasper.Constants;
   import org.apache.jasper.JasperException;
  @@ -270,33 +268,7 @@
        * Determines whether the current JSP class is older than the JSP file
        * from whence it came
        */
  -    public boolean isOutDated()
  -    {
  -        if( System.getSecurityManager() == null )
  -            return isOutDated_normal();
  -        else
  -            return isOutDated_priviledged();
  -    }
  -
  -    /**
  -     * When using a SecurityManager and a JSP page itself triggers
  -     * another JSP due to an errorPage or from a jsp:include,
  -     * the isOutDated check must be performed with the Permissions of
  -     * this class using doPriviledged because the parent JSP
  -     * may not have sufficient Permissions.
  -     */
  -    private final boolean isOutDated_priviledged() {
  -        class doInit implements PrivilegedAction {
  -            public Object run() {
  -                return new Boolean(isOutDated_normal());
  -            }
  -        }    
  -        doInit di = new doInit();
  -        Boolean res = (Boolean)AccessController.doPrivileged(di);
  -        return res.booleanValue();
  -    }
  -
  -    private final boolean isOutDated_normal() {
  +    public boolean isOutDated() {
           File jspReal = null;
   
           jspReal = new File(ctxt.getRealPath(jsp.getPath()));
  @@ -311,34 +283,7 @@
           return outDated;
       }
   
  -    /**
  -     * When using a SecurityManager and a JSP page itself triggers
  -     * another JSP due to an errorPage or from a jsp:include,
  -     * the computeClassFileData must be performed with the Permissions of
  -     * this class using doPriviledged because the parent JSP
  -     * may not have sufficient Permissions.
  -     */
       private final void computeClassFileData() {
  -        if( System.getSecurityManager() == null )
  -            computeClassFileData_normal();
  -        else
  -            computeClassFileData_priviledged();
  -    }
  -
  -    private final void computeClassFileData_priviledged()
  -    {
  -        class doInit implements PrivilegedAction {
  -            public Object run()
  -            {
  -                computeClassFileData_normal();
  -                return null;
  -            }
  -        }
  -        doInit di = new doInit();
  -        AccessController.doPrivileged(di);
  -    }
  -
  -    private final void computeClassFileData_normal() {
   	File jspReal = null;
   
           String initPath = jsp.getPath();
  
  
  
  1.10      +33 -32    jakarta-tomcat/src/share/org/apache/jasper/runtime/JspLoader.java
  
  Index: JspLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspLoader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- JspLoader.java	2000/06/13 00:32:30	1.9
  +++ JspLoader.java	2000/06/15 00:26:43	1.10
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspLoader.java,v 1.9 2000/06/13 00:32:30 costin Exp $
  - * $Revision: 1.9 $
  - * $Date: 2000/06/13 00:32:30 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspLoader.java,v 1.10 2000/06/15 00:26:43 costin Exp $
  + * $Revision: 1.10 $
  + * $Date: 2000/06/15 00:26:43 $
    *
    * ====================================================================
    * 
  @@ -84,7 +84,7 @@
   import org.apache.jasper.compiler.Compiler;
   
   import org.apache.tomcat.logging.Logger;
  -
  +import javax.servlet.http.*;
   /**
    * This is a class loader that loads JSP files as though they were
    * Java classes. It calls the compiler to compile the JSP file into a
  @@ -110,13 +110,18 @@
       /*
        * This should be factoried out
        */
  -    public JspLoader(ClassLoader cl, Options options)
  -    {
  -	//	super(cl); // JDK 1.2 FIXME
  +    public JspLoader() {
   	super();
  +    }
  +
  +    public void setParentClassLoader( ClassLoader cl) 
  +    {
   	this.parent = cl;
  -        this.options = options; 
       }
  +    
  +    public void setOptions( Options options) {
  +	this.options = options;
  +    }
   
       protected synchronized Class loadClass(String name, boolean resolve)
   	throws ClassNotFoundException
  @@ -205,21 +210,7 @@
                    * this class using doPriviledged because the parent JSP
                    * may not have sufficient Permissions.
                    */
  -                if( System.getSecurityManager() != null ) {
  -                    class doInit implements PrivilegedAction {
  -                        private String fileName;
  -                        public doInit(String file) {
  -                            fileName = file;
  -                        }
  -                        public Object run() {
  -                            return loadClassDataFromFile(fileName);
  -                        }
  -                    }
  -                    doInit di = new doInit(fileName);
  -                    classBytes = (byte [])AccessController.doPrivileged(di);
  -                } else {
  -                    classBytes = loadClassDataFromFile(fileName);
  -                }
  +		classBytes = loadClassDataFromFile(fileName);
                   if( classBytes == null ) {
                       throw new ClassNotFoundException(Constants.getString(
                                                "jsp.error.unable.loadclass", 
  @@ -238,14 +229,7 @@
        * Just a short hand for defineClass now... I suspect we might need to
        * make this public at some point of time. 
        */
  -    private final Class defClass(String className, byte[] classData) {
  -        // If a SecurityManager is being used, set the ProtectionDomain
  -        // for this clas when it is defined.
  -        Object pd = options.getProtectionDomain();
  -        if( pd != null ) {
  -	    //	    System.out.println("JspLoader: loading with " + pd );
  -	    return defineClass(className, classData, 0, classData.length, (ProtectionDomain)pd);
  -	}
  +    protected  Class defClass(String className, byte[] classData) {
           return defineClass(className, classData, 0, classData.length);
       }
   
  @@ -253,7 +237,15 @@
        * Load JSP class data from file, method may be called from
        * within a doPriviledged if a SecurityManager is installed.
        */
  -    private byte[] loadClassDataFromFile(String fileName) {
  +    protected byte[] loadClassDataFromFile(String fileName) {
  +	return doLoadClassDataFromFile( fileName );
  +    }
  +
  +    /**
  +     * Load JSP class data from file, method may be called from
  +     * within a doPriviledged if a SecurityManager is installed.
  +     */
  +    protected byte[] doLoadClassDataFromFile(String fileName) {
           byte[] classBytes = null;
           try {
               FileInputStream fin = new FileInputStream(fileName);
  @@ -352,4 +344,13 @@
       public String toString() {
   	return "JspLoader( " +  options.getScratchDir()   + " ) / " + parent;
       }
  +
  +    boolean loadJSP(JspServlet jspS, String name, String classpath, 
  +		    boolean isErrorPage, HttpServletRequest req,
  +		    HttpServletResponse res) 
  +	throws JasperException, FileNotFoundException 
  +    {
  +	return jspS.doLoadJSP( name, classpath, isErrorPage, req, res );
  +    }
  +
   }
  
  
  
  1.25      +39 -3     jakarta-tomcat/src/share/org/apache/jasper/runtime/JspServlet.java
  
  Index: JspServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspServlet.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- JspServlet.java	2000/06/13 00:32:30	1.24
  +++ JspServlet.java	2000/06/15 00:26:43	1.25
  @@ -203,6 +203,14 @@
       String serverInfo;
   
       static boolean firstTime = true;
  +    static boolean jdk12=false;
  +    static {
  +	try {
  +	    Class.forName( "java.security.PrivilegedAction" );
  +	    jdk12=true;
  +	} catch(Throwable ex ) {
  +	}
  +    }
   
       public void init(ServletConfig config)
   	throws ServletException
  @@ -232,9 +240,21 @@
                                 }, Logger.DEBUG);
   	}
   	//	System.out.println("JspServlet: init " + config.getServletName() );
  -	this.loader = new JspLoader(parentClassLoader, 
  -				    options);
  +	if( loader==null ) {
  +	    if( jdk12 ) {
  +		try {
  +		    Class ld=Class.forName("org.apache.jasper.runtime.JspLoader12");
  +		    loader=(JspLoader)ld.newInstance();
  +		} catch(Throwable t ) {
  +		    t.printStackTrace();
  +		}
  +	    }
  +	    if( loader==null )
  +		loader = new JspLoader();
   
  +	    loader.setParentClassLoader(parentClassLoader);
  +	    loader.setOptions(options);
  +	}
   	if (firstTime) {
   	    firstTime = false;
   	    Constants.message("jsp.message.scratch.dir.is", 
  @@ -398,8 +418,24 @@
        *
        *  @param classpath explicitly set the JSP compilation path.
        *  @return true if JSP files is newer
  +     */
  +    boolean loadJSP(String name, String classpath, 
  +	boolean isErrorPage, HttpServletRequest req, HttpServletResponse res) 
  +	throws JasperException, FileNotFoundException 
  +    {
  +	// Loader knows how to set the right priviledges, and call
  +	// doLoadeJsp
  +	return loader.loadJSP( this, name, classpath, isErrorPage, req, res );
  +    }
  +
  +    /*  Check if we need to reload a JSP page.
  +     *
  +     *  Side-effect: re-compile the JSP page.
  +     *
  +     *  @param classpath explicitly set the JSP compilation path.
  +     *  @return true if JSP files is newer
        */
  -    public boolean loadJSP(String name, String classpath, 
  +    boolean doLoadJSP(String name, String classpath, 
   	boolean isErrorPage, HttpServletRequest req, HttpServletResponse res) 
   	throws JasperException, FileNotFoundException 
       {
  
  
  
  1.1                  jakarta-tomcat/src/share/org/apache/jasper/runtime/JspLoader12.java
  
  Index: JspLoader12.java
  ===================================================================
  /*
   * ====================================================================
   * 
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights 
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer. 
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:  
   *       "This product includes software developed by the 
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written 
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */ 
  
  package org.apache.jasper.runtime;
  
  import java.io.FileInputStream;
  import java.io.ByteArrayOutputStream;
  import java.io.File;
  import java.io.FileNotFoundException;
  import java.io.InputStream;
  import java.io.IOException;
  
  import java.util.Hashtable;
  import java.util.Vector;
  import java.util.zip.ZipFile;
  import java.util.zip.ZipEntry;
  import java.net.URL;
  
  import java.security.*;
  
  import org.apache.jasper.JasperException;
  import org.apache.jasper.Constants;
  import org.apache.jasper.JspCompilationContext;
  import org.apache.jasper.JspEngineContext;
  import org.apache.jasper.Options;
  import org.apache.jasper.compiler.Compiler;
  
  import org.apache.tomcat.logging.Logger;
  import javax.servlet.http.*;
  /**
   * 1.2 version of the JspLoader
   * 
   * @author Anil K. Vijendran
   * @author Harish Prabandham
   * @author Costin Manolache 
   */
  public class JspLoader12 extends JspLoader {
  
      JspLoader12()
      {
  	super();
      }
  
      /**
       */
      protected  Class defClass(String className, byte[] classData) {
          // If a SecurityManager is being used, set the ProtectionDomain
          // for this clas when it is defined.
          Object pd = options.getProtectionDomain();
          if( pd != null ) {
  	    return defineClass(className, classData, 0,
  			       classData.length,
  			       (ProtectionDomain)pd);
  	}
          return defineClass(className, classData, 0, classData.length);
      }
  
      protected byte[] loadClassDataFromFile( String fileName ) {
  	/**
  	 * When using a SecurityManager and a JSP page itself triggers
  	 * another JSP due to an errorPage or from a jsp:include,
  	 * the loadClass must be performed with the Permissions of
  	 * this class using doPriviledged because the parent JSP
  	 * may not have sufficient Permissions.
  	 */
  	if( System.getSecurityManager() != null ) {
  	    class doInit implements PrivilegedAction {
  		private String fileName;
  		public doInit(String file) {
  		    fileName = file;
  		}
  		public Object run() {
  		    return doLoadClassDataFromFile(fileName);
  		}
  	    }
  	    doInit di = new doInit(fileName);
  	    return (byte [])AccessController.doPrivileged(di);
  	} else {
  	    return doLoadClassDataFromFile( fileName );
  	}
      }
  
      // Hack - we want to keep JDK1.2 dependencies in fewer places,
      // and same for doPriviledged.
      boolean loadJSP(JspServlet jspS, String name, String classpath, 
  		    boolean isErrorPage, HttpServletRequest req,
  		    HttpServletResponse res) 
  	throws JasperException, FileNotFoundException 
      {
          if( System.getSecurityManager() == null ) {
  	    return jspS.doLoadJSP( name, classpath, isErrorPage, req, res );
  	}
  
  	final JspServlet jspServlet=jspS;
  	final String nameF=name;
  	final String classpathF=classpath;
  	final boolean isErrorPageF=isErrorPage;
  	final HttpServletRequest reqF=req;
  	final HttpServletResponse resF=res;
  	try {
  	    Boolean b = (Boolean)AccessController.doPrivileged(new
  		PrivilegedExceptionAction() {
  		    public Object run() throws Exception
  		    {
  			return new Boolean(jspServlet.doLoadJSP( nameF,
  								 classpathF,
  								 isErrorPageF,
  								 reqF, resF ));
  		    } 
  		});
  	    return b.booleanValue();
  	} catch( Exception ex ) {
  	    if( ex instanceof JasperException )
  		throw (JasperException)ex;
  	    if( ex instanceof FileNotFoundException )
  		throw (FileNotFoundException) ex;
  	    throw new JasperException( ex );
  	}
      }
  
  }
  
  
  
  1.93      +26 -26    jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
  
  Index: Context.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- Context.java	2000/06/10 21:55:28	1.92
  +++ Context.java	2000/06/15 00:26:45	1.93
  @@ -998,32 +998,32 @@
   	return rInterceptors;
       }
   
  -     /**
  -      * Adds a Permission to a Permissions object which will be used as
  -      * the Permissions for this Context.  These are the Permissions
  -      * set using the <Permission> element within the <Context> server.xml element.
  -      */
  -     public void setPermission(String className, String attr, String value) {
  -         try {
  -             if( perms == null )
  -                 perms = new Permissions();
  -             Class c=Class.forName(className);
  -             Constructor con=c.getConstructor(new Class[]{String.class,String.class});
  -             Object [] args=new Object[2];
  -             args[0] = attr;
  -             args[1] = value;
  -             Permission p = (Permission)con.newInstance(args);
  -             ((Permissions)perms).add(p);
  -         } catch( ClassNotFoundException ex ) {
  -             System.out.println("SecurityManager Class not found: " + className);
  -             System.exit(1);
  -         } catch( Exception ex ) {
  -             System.out.println("SecurityManager Class could not be loaded: " + className);
  -             ex.printStackTrace();
  -             System.exit(1);
  -         }
  -         System.out.println("SecurityManager, " + className + ", \"" + attr + "\", \"" + value + "\" added");
  -     }  
  +//      /**
  +//       * Adds a Permission to a Permissions object which will be used as
  +//       * the Permissions for this Context.  These are the Permissions
  +//       * set using the <Permission> element within the <Context> server.xml element.
  +//       */
  +//      public void setPermission(String className, String attr, String value) {
  +//          try {
  +//              if( perms == null )
  +//                  perms = new Permissions();
  +//              Class c=Class.forName(className);
  +//              Constructor con=c.getConstructor(new Class[]{String.class,String.class});
  +//              Object [] args=new Object[2];
  +//              args[0] = attr;
  +//              args[1] = value;
  +//              Permission p = (Permission)con.newInstance(args);
  +//              ((Permissions)perms).add(p);
  +//          } catch( ClassNotFoundException ex ) {
  +//              System.out.println("SecurityManager Class not found: " + className);
  +//              System.exit(1);
  +//          } catch( Exception ex ) {
  +//              System.out.println("SecurityManager Class could not be loaded: " + className);
  +//              ex.printStackTrace();
  +//              System.exit(1);
  +//          }
  +//          System.out.println("SecurityManager, " + className + ", \"" + attr + "\", \"" + value + "\" added");
  +//      }  
    
        /**
         * Get the SecurityManager Permissions for this Context.
  
  
  
  1.89      +4 -4      jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java
  
  Index: ContextManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ContextManager.java,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- ContextManager.java	2000/06/13 00:32:36	1.88
  +++ ContextManager.java	2000/06/15 00:26:46	1.89
  @@ -72,7 +72,7 @@
   import java.io.*;
   import java.net.*;
   import java.util.*;
  -import java.security.*;
  +//import java.security.*;
   
   /* XXX The main function of CM is to serve as an entry point into
      tomcat and manage a list of resources that are part of the servlet
  @@ -134,7 +134,7 @@
       /**
        * The default security permissions to use
        */
  -    private Permissions permissions;
  +    private Object permissions;
   
       /** Adapters for the incoming protocol
        */
  @@ -287,8 +287,8 @@
       /**
        * Add a Permission to the default Permissions
        */
  -    public void addPermissions(SetSecurityManager secman) {
  -	permissions = secman.getPermissions();
  +    public void setPermissions(Object permissions) {
  +	this.permissions = permissions;
       }
   
       
  
  
  
  1.7       +18 -36    jakarta-tomcat/src/share/org/apache/tomcat/loader/AdaptiveClassLoader.java
  
  Index: AdaptiveClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/loader/AdaptiveClassLoader.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AdaptiveClassLoader.java	2000/06/10 17:09:04	1.6
  +++ AdaptiveClassLoader.java	2000/06/15 00:26:47	1.7
  @@ -118,7 +118,7 @@
    * @author Martin Pool
    * @author Jim Heintz
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.6 $ $Date: 2000/06/10 17:09:04 $
  + * @version $Revision: 1.7 $ $Date: 2000/06/15 00:26:47 $
    * @see java.lang.ClassLoader
    */
   public class AdaptiveClassLoader extends ClassLoader {
  @@ -127,7 +127,7 @@
       /**
        * Instance of the SecurityManager installed.
        */
  -    static private SecurityManager sm;
  +    static protected SecurityManager sm;
   
       /**
        * Generation counter, incremented for each classloader as they are
  @@ -154,7 +154,7 @@
        * <p>
        * It may be empty when only system classes are controlled.
        */
  -    private Vector repository;
  +    protected Vector repository;
   
       /**
        * A parent class loader for delegation of finding a class definition.
  @@ -162,7 +162,7 @@
        * being passed to a constructor, and retreived with getParent() method. For JDK 1.1
        * compatibility, we'll duplicate the 1.2 private member var.
        */
  -    private ClassLoader parent;
  +    protected ClassLoader parent;
       
       /**
        * Private class used to maintain information about the classes that
  @@ -199,23 +199,6 @@
   
       /**
        * Creates a new class loader that will load classes from specified
  -     * class repositories.
  -     *
  -     * @param classRepository An set of File classes indicating
  -     *        directories and/or zip/jar files. It may be empty when
  -     *        only system classes are loaded.
  -     * @throw java.lang.IllegalArgumentException if the objects contained
  -     *        in the vector are not a file instance or the file is not
  -     *        a valid directory or a zip/jar file.
  -     */
  -    public AdaptiveClassLoader(Vector classRepository)
  -        throws IllegalArgumentException
  -    {
  -	this(classRepository, null);
  -    }
  -    
  -    /**
  -     * Creates a new class loader that will load classes from specified
        * class repositories, delegating first to the passed parent for definitions.
        *
        * @param classRepository An set of File classes indicating
  @@ -227,11 +210,12 @@
        *        in the vector are not a file instance or the file is not
        *        a valid directory or a zip/jar file.
        */
  -    public AdaptiveClassLoader(Vector classRepository, ClassLoader theParent)
  +    public AdaptiveClassLoader() {
  +    }
  +
  +    public void setRepository( Vector classRepository ) 
   	throws IllegalArgumentException
       {
  -	this.parent = theParent;
  -	
   	// Create the cache of loaded classes
   	cache = new Hashtable();
   	
  @@ -396,7 +380,9 @@
        * as this one.
        */
       public AdaptiveClassLoader reinstantiate() {
  -        return new AdaptiveClassLoader(repository);
  +        AdaptiveClassLoader cl=new AdaptiveClassLoader();
  +	cl.setRepository(repository);
  +	return cl;
       }
   
       //------------------------------------ Implementation of Classloader
  @@ -502,10 +488,6 @@
   		    classData =
                           loadClassFromZipfile(file, name, classCache);
   		}
  -            // Make sure we catch and rethrow SecurityManager exceptions
  -            } catch(AccessControlException aex) {
  -                aex.printStackTrace();
  -                throw aex;
               } catch(SecurityException sex) {
                   sex.printStackTrace();
                   throw sex;
  @@ -518,13 +500,7 @@
   
               if (classData != null) {
                   // Define the class with a ProtectionDomain if using a SecurityManager
  -                if( sm != null ) {
  -                // Define the class
  -		    //		    System.out.println("Defining class using PT ");
  -                    c = defineClass(name, classData, 0, classData.length, cp.getProtectionDomain());
  -                } else {
  -                c = defineClass(name, classData, 0, classData.length);
  -                }
  +                c=doDefineClass(name, classData, cp.getProtectionDomain());
                   // Cache the result;
                   classCache.loadedClass = c;
                   // Origin is set by the specific loader
  @@ -541,6 +517,12 @@
           throw new ClassNotFoundException(name);
       }
   
  +    // Override this with PD
  +    protected Class doDefineClass(String name, byte classData[], Object pd )
  +    {
  +	return  defineClass(name, classData, 0, classData.length);
  +    }
  +    
       /**
        * Load a class using the system classloader.
        *
  
  
  
  1.7       +28 -5     jakarta-tomcat/src/share/org/apache/tomcat/loader/AdaptiveServletLoader.java
  
  Index: AdaptiveServletLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/loader/AdaptiveServletLoader.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- AdaptiveServletLoader.java	2000/06/10 17:09:04	1.6
  +++ AdaptiveServletLoader.java	2000/06/15 00:26:47	1.7
  @@ -69,13 +69,23 @@
   // method in ClassLoader. The alternative is to require a public method with
   // the equivalent functionality
   
  -public class AdaptiveServletLoader  extends AdaptiveClassLoader implements ServletLoader  {
  +public class AdaptiveServletLoader  extends AdaptiveClassLoader
  +    implements ServletLoader
  +{
       AdaptiveClassLoader classL;
  +    static boolean jdk12=false;
  +    static {
  +	try {
  +	    Class.forName( "java.security.PrivilegedAction" );
  +	    jdk12=true;
  +	} catch(Throwable ex ) {
  +	}
  +    }
       Vector classP;
       ClassLoader parent;
       
       public AdaptiveServletLoader() {
  -	super( new Vector() ); // dumy -
  +	super(); // dumy -
   	// this class will not be used as a class loader, it's just a trick for
   	// protected loadClass()
   	classP=new Vector();
  @@ -133,8 +143,21 @@
       /** Return a real class loader
        */
       public ClassLoader getClassLoader() {
  -	if( classL==null )
  -	    classL= new AdaptiveClassLoader( classP, parent );
  +	if( classL==null && jdk12 ) {
  +	    try {
  +		Class ld=Class.forName("org.apache.tomcat.loader.AdaptiveClassLoader12");
  +		classL=(AdaptiveClassLoader)ld.newInstance();
  +	    } catch(Throwable t ) {
  +		t.printStackTrace();
  +	    }
  +	}
  +
  +	if( classL==null ) {
  +	    // jdk1.1 or error
  +	    classL= new AdaptiveClassLoader();
  +	}
  +	classL.setParent( parent );
  +	classL.setRepository( classP );
   	return classL;
       }
   
  @@ -177,7 +200,7 @@
       public void addRepository( File f, Object pd ) {
   	try {
               classP.addElement(
  -                new ClassRepository( new File(FileUtil.patch(f.getCanonicalPath())), (ProtectionDomain)pd )
  +                new ClassRepository( new File(FileUtil.patch(f.getCanonicalPath())), pd )
                   );
   	} catch( IOException ex) {
               ex.printStackTrace();
  
  
  
  1.2       +3 -4      jakarta-tomcat/src/share/org/apache/tomcat/loader/ClassRepository.java
  
  Index: ClassRepository.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/loader/ClassRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ClassRepository.java	2000/05/26 18:55:28	1.1
  +++ ClassRepository.java	2000/06/15 00:26:47	1.2
  @@ -61,13 +61,12 @@
   import java.io.*;
   import java.lang.*;
   import java.util.*;
  -import java.security.*;
   
   public class ClassRepository {
       private File file;
  -    private ProtectionDomain protectionDomain;
  +    private Object protectionDomain;
   
  -    public ClassRepository( File f, ProtectionDomain pd) {
  +    public ClassRepository( File f, Object pd) {
   	file = f;
   	protectionDomain = pd;
       } 
  @@ -76,7 +75,7 @@
   	return file;
       }
   
  -    public ProtectionDomain getProtectionDomain() {
  +    public Object getProtectionDomain() {
   	return protectionDomain;
       }
   }
  
  
  
  1.3       +1 -0      jakarta-tomcat/src/share/org/apache/tomcat/loader/SetSecurityManager.java
  
  Index: SetSecurityManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/loader/SetSecurityManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SetSecurityManager.java	2000/05/26 23:06:35	1.2
  +++ SetSecurityManager.java	2000/06/15 00:26:47	1.3
  @@ -88,6 +88,7 @@
   	    Class c=Class.forName(className);
   	    Object o=c.newInstance();
   	    System.setSecurityManager((SecurityManager)o);
  +	    System.out.println("Security Manager set to " + className);
   	} catch( ClassNotFoundException ex ) {
   	    System.out.println("SecurityManager Class not found: " + className);
   	    System.exit(1);
  
  
  
  1.1                  jakarta-tomcat/src/share/org/apache/tomcat/loader/AdaptiveClassLoader12.java
  
  Index: AdaptiveClassLoader12.java
  ===================================================================
  /*
   * Copyright (c) 1997-1999 The Java Apache Project.  All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. All advertising materials mentioning features or use of this
   *    software must display the following acknowledgment:
   *    "This product includes software developed by the Java Apache 
   *    Project for use in the Apache JServ servlet engine project
   *    <http://java.apache.org/>."
   *
   * 4. The names "Apache JServ", "Apache JServ Servlet Engine" and 
   *    "Java Apache Project" must not be used to endorse or promote products 
   *    derived from this software without prior written permission.
   *
   * 5. Products derived from this software may not be called "Apache JServ"
   *    nor may "Apache" nor "Apache JServ" appear in their names without 
   *    prior written permission of the Java Apache Project.
   *
   * 6. Redistributions of any form whatsoever must retain the following
   *    acknowledgment:
   *    "This product includes software developed by the Java Apache 
   *    Project for use in the Apache JServ servlet engine project
   *    <http://java.apache.org/>."
   *    
   * THIS SOFTWARE IS PROVIDED BY THE JAVA APACHE PROJECT "AS IS" AND ANY
   * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
   * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE JAVA APACHE PROJECT OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
   * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
   * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
   * OF THE POSSIBILITY OF SUCH DAMAGE.
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Java Apache Group. For more information
   * on the Java Apache Project and the Apache JServ Servlet Engine project,
   * please see <http://java.apache.org/>.
   *
   */
  
  package org.apache.tomcat.loader;
  
  import java.io.*;
  import java.lang.*;
  import java.net.*;
  import java.text.*;
  import java.util.*;
  import java.util.zip.*;
  import java.security.*;
  
  /** Fixes for 1.2
   */
  public class AdaptiveClassLoader12 extends AdaptiveClassLoader {
  
      public AdaptiveClassLoader12()
      {
  	super();
      }
      
      public AdaptiveClassLoader reinstantiate() {
          AdaptiveClassLoader cl=new AdaptiveClassLoader12();
  	cl.setRepository(repository);
  	cl.setParent( parent );
  	return cl;
      }
  
      protected Class doDefineClass(String name, byte classData[], Object pd )
      {
  	if( sm != null ) {
  	    return defineClass(name, classData, 0, classData.length,
  			       (ProtectionDomain)pd);
  	} else {
  	    return  defineClass(name, classData, 0, classData.length);
  	}
      }
  
  }
  
  
  
  1.2       +1 -1      jakarta-tomcat/src/share/org/apache/tomcat/request/JDBCRealm.java
  
  Index: JDBCRealm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/JDBCRealm.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JDBCRealm.java	2000/06/10 14:36:12	1.1
  +++ JDBCRealm.java	2000/06/15 00:26:50	1.2
  @@ -336,7 +336,7 @@
             // Next we convert the resultset into a String[]
                 Vector vrol=new Vector();
                 while (rs.next()) {
  -                  vrol.add(rs.getString(1));
  +                  vrol.addElement(rs.getString(1));
                 }
                 String[] res=new String[vrol.size()];
                 for(int i=0 ; i<vrol.size() ; i++ )
  
  
  
  1.29      +10 -10    jakarta-tomcat/src/share/org/apache/tomcat/startup/Tomcat.java
  
  Index: Tomcat.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Tomcat.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Tomcat.java	2000/06/13 00:32:41	1.28
  +++ Tomcat.java	2000/06/15 00:26:50	1.29
  @@ -65,11 +65,11 @@
    	xh.addRule( "ContextManager/Context", xh.objectCreate("org.apache.tomcat.core.Context"));
   	xh.addRule( "ContextManager/Context", xh.setParent( "setContextManager") );
   	xh.addRule( "ContextManager/Context", xh.setProperties() );
  -        // Rules for setting Context SecurityManager Permissions
  -        xh.addRule( "ContextManager/Context/Permission",xh.methodSetter("setPermission",3));
  -        xh.addRule( "ContextManager/Context/Permission",xh.methodParam(0,"className"));
  -        xh.addRule( "ContextManager/Context/Permission",xh.methodParam(1,"attribute"));
  -        xh.addRule( "ContextManager/Context/Permission",xh.methodParam(2,"value"));
  +//         // Rules for setting Context SecurityManager Permissions
  +//         xh.addRule( "ContextManager/Context/Permission",xh.methodSetter("setPermission",3));
  +//         xh.addRule( "ContextManager/Context/Permission",xh.methodParam(0,"className"));
  +//         xh.addRule( "ContextManager/Context/Permission",xh.methodParam(1,"attribute"));
  +//         xh.addRule( "ContextManager/Context/Permission",xh.methodParam(2,"value"));
   	xh.addRule( "ContextManager/Context", xh.addChild( "addContext", null ) );
   
   	// Virtual host support.
  @@ -144,11 +144,11 @@
       void setSecurityManager( XmlMapper xh ) {
           xh.addRule("Server/SecurityManager", xh.objectCreate("org.apache.tomcat.loader.SetSecurityManager"));
           xh.addRule("Server/SecurityManager", xh.setProperties());
  -        xh.addRule("Server/SecurityManager/Permission",xh.methodSetter("setPermission",3));
  -        xh.addRule("Server/SecurityManager/Permission",xh.methodParam(0,"className"));
  -        xh.addRule("Server/SecurityManager/Permission",xh.methodParam(1,"attribute"));
  -        xh.addRule("Server/SecurityManager/Permission",xh.methodParam(2,"value"));
  -        xh.addRule("Server/SecurityManager",xh.addChild("addPermissions",null));
  +//         xh.addRule("Server/SecurityManager/Permission",xh.methodSetter("setPermission",3));
  +//         xh.addRule("Server/SecurityManager/Permission",xh.methodParam(0,"className"));
  +//         xh.addRule("Server/SecurityManager/Permission",xh.methodParam(1,"attribute"));
  +//         xh.addRule("Server/SecurityManager/Permission",xh.methodParam(2,"value"));
  +//         xh.addRule("Server/SecurityManager",xh.addChild("addPermissions",null));
       }
   
       /**
  
  
  

Mime
View raw message