Revert attempt to fix 43878 since patch is obviously wrong.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 28 Jan 2008 21:05:04 +0000 (21:05 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 28 Jan 2008 21:05:04 +0000 (21:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@616042 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/JspCompilationContext.java
java/org/apache/jasper/compiler/JspRuntimeContext.java

index 0fe40f3..b98e6fe 100644 (file)
@@ -34,6 +34,7 @@ import org.apache.jasper.compiler.JspRuntimeContext;
 import org.apache.jasper.compiler.JspUtil;
 import org.apache.jasper.compiler.Localizer;
 import org.apache.jasper.compiler.ServletWriter;
+import org.apache.jasper.servlet.JasperLoader;
 import org.apache.jasper.servlet.JspServletWrapper;
 
 /**
@@ -175,7 +176,11 @@ public class JspCompilationContext {
 
     public ClassLoader getJspLoader() {
         if( jspLoader == null ) {
-            jspLoader = rctxt.getJspLoader(baseUrl, getClassLoader());
+            jspLoader = new JasperLoader
+            (new URL[] {baseUrl},
+                    getClassLoader(),
+                    rctxt.getPermissionCollection(),
+                    rctxt.getCodeSource());
         }
         return jspLoader;
     }
index 2a73987..6e4fe06 100644 (file)
@@ -38,7 +38,6 @@ import org.apache.jasper.JspCompilationContext;
 import org.apache.jasper.Options;
 import org.apache.jasper.runtime.JspFactoryImpl;
 import org.apache.jasper.security.SecurityClassLoad;
-import org.apache.jasper.servlet.JasperLoader;
 import org.apache.jasper.servlet.JspServletWrapper;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -156,7 +155,6 @@ public final class JspRuntimeContext {
     private ServletContext context;
     private Options options;
     private URLClassLoader parentClassLoader;
-    private JasperLoader jspLoader;
     private PermissionCollection permissionCollection;
     private CodeSource codeSource;                    
     private String classpath;
@@ -319,29 +317,6 @@ public final class JspRuntimeContext {
     }
 
 
-    /**
-     * Obtain the classloader to use when loading JSP resources. In development
-     * mode, each JSP has a separate classloader to enable easy re-loading of
-     * modified JSPs. If not in development mode, a single loader is used to
-     * reduce perm gen usage when many JSPs all use the same handful of tags.
-     */
-    public URLClassLoader getJspLoader(URL baseUrl, ClassLoader parent) {
-        if (jspLoader == null) {
-            if (options.getDevelopment()) {
-                jspLoader = new JasperLoader
-                (new URL[] {baseUrl},
-                        parent,
-                        permissionCollection,
-                        codeSource);
-            } else {
-                jspLoader = new JasperLoader(new URL[] {baseUrl},
-                    parent, permissionCollection, codeSource);
-            }
-        }
-        return jspLoader;
-    }
-
-
     // -------------------------------------------------------- Private Methods