You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2001/09/28 05:24:08 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardContext.java StandardWrapper.java

remm        01/09/27 20:24:08

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java StandardWrapper.java
  Log:
  - Slightly experimental change: remove the Jasper loader (which is useless now that
    the XML parser is loaded from common/lib).
  
  Revision  Changes    Path
  1.81      +4 -65     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.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- StandardContext.java	2001/09/26 23:07:53	1.80
  +++ StandardContext.java	2001/09/28 03:24:07	1.81
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.80 2001/09/26 23:07:53 remm Exp $
  - * $Revision: 1.80 $
  - * $Date: 2001/09/26 23:07:53 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.81 2001/09/28 03:24:07 remm Exp $
  + * $Revision: 1.81 $
  + * $Date: 2001/09/28 03:24:07 $
    *
    * ====================================================================
    *
  @@ -142,7 +142,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.80 $ $Date: 2001/09/26 23:07:53 $
  + * @version $Revision: 1.81 $ $Date: 2001/09/28 03:24:07 $
    */
   
   public class StandardContext
  @@ -311,14 +311,6 @@
   
   
       /**
  -     * The special class loader created for Jasper in order to isolate
  -     * its use of an XML parser from the libraries made visible to
  -     * web applications.
  -     */
  -    private ClassLoader jasperLoader = null;
  -
  -
  -    /**
        * The local  EJB resource references for this web application, keyed by
        * name.
        */
  @@ -815,7 +807,6 @@
       public synchronized void setLoader(Loader loader) {
   
           super.setLoader(loader);
  -        jasperLoader = null;
   
       }
   
  @@ -1124,52 +1115,6 @@
   
   
       /**
  -     * Return the special class loader for Jasper for this web application,
  -     * creating one if required.
  -     */
  -    public synchronized ClassLoader getJasperLoader() {
  -
  -        // Return the existing class loader (if any)
  -        if (jasperLoader != null) {
  -            return (jasperLoader);
  -        }
  -
  -        // Can we set up the corresponding Jasper class loader?
  -        if (loader == null) {
  -            return (null);
  -        }
  -        ClassLoader classLoader = loader.getClassLoader();
  -        if (classLoader == null) {
  -            return (null);
  -        }
  -
  -        // Set up the Jasper class loader
  -        StandardClassLoader newLoader = new StandardClassLoader(classLoader);
  -        newLoader.setDelegate(true);
  -        File directory = new File(System.getProperty("catalina.home"),
  -                                  "jasper");
  -        if (directory.exists() && directory.canRead() &&
  -            directory.isDirectory()) {
  -            String filenames[] = directory.list();
  -            for (int i = 0; i < filenames.length; i++) {
  -                if (!filenames[i].endsWith(".jar"))
  -                    continue;
  -                File file = new File(directory, filenames[i]);
  -                try {
  -                    URL url = new URL("file", null, file.getCanonicalPath());
  -                    newLoader.addRepository(url.toString());
  -                } catch (IOException e) {
  -                    throw new IllegalArgumentException(e.toString());
  -                }
  -            }
  -        }
  -        jasperLoader = newLoader;
  -        return (jasperLoader);
  -
  -    }
  -
  -
  -    /**
        * Return the default Mapper class name.
        */
       public String getMapperClass() {
  @@ -2430,9 +2375,6 @@
           // Binding thread
           unbindThread(oldCCL);
   
  -        // Dump the old Jasper loader
  -        jasperLoader = null;
  -
           // Shut down our application class loader
           if ((loader != null) && (loader instanceof Lifecycle)) {
               try {
  @@ -3460,9 +3402,6 @@
   
           // Unbinding thread
           unbindThread(oldCCL);
  -
  -        // Dump the old Jasper loader
  -        jasperLoader = null;
   
           if (debug >= 1)
               log("Stopping complete");
  
  
  
  1.30      +4 -17     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
  
  Index: StandardWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- StandardWrapper.java	2001/08/23 16:42:26	1.29
  +++ StandardWrapper.java	2001/09/28 03:24:07	1.30
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v 1.29 2001/08/23 16:42:26 craigmcc Exp $
  - * $Revision: 1.29 $
  - * $Date: 2001/08/23 16:42:26 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardWrapper.java,v 1.30 2001/09/28 03:24:07 remm Exp $
  + * $Revision: 1.30 $
  + * $Date: 2001/09/28 03:24:07 $
    *
    * ====================================================================
    *
  @@ -105,7 +105,7 @@
    * make them efficient are counter-productive.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.29 $ $Date: 2001/08/23 16:42:26 $
  + * @version $Revision: 1.30 $ $Date: 2001/09/28 03:24:07 $
    */
   
   public final class StandardWrapper
  @@ -185,12 +185,6 @@
   
   
       /**
  -     * The specialized class loader for the Jasper JSP servlet.
  -     */
  -    private ClassLoader jasperLoader = null;
  -
  -
  -    /**
        * The context-relative URI of the JSP file for this servlet.
        */
       private String jspFile = null;
  @@ -800,12 +794,6 @@
                     ("standardWrapper.containerServlet", getName()));
           }
   
  -        // Special case class loader for the Jasper JSP servlet
  -        if (actualClass.equals(Constants.JSP_SERVLET_CLASS)) {
  -            classLoader = ((StandardContext) getParent()).getJasperLoader();
  -            log(sm.getString("standardWrapper.jasperLoader", getName()));
  -        }
  -
           // Load the specified servlet class from the appropriate class loader
           Class classClass = null;
           try {
  @@ -1031,7 +1019,6 @@
   
           // Deregister the destroyed instance
           instance = null;
  -        jasperLoader = null;
           unloading = false;
           fireContainerEvent("unload", this);