Revert r616563 which was a fix for bug 43878 that has now been marked as WONTFIX.
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 21 Feb 2008 22:02:50 +0000 (22:02 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 21 Feb 2008 22:02:50 +0000 (22:02 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@630019 13f79535-47bb-0310-9956-ffa450edef68

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

index fe667c8..efa251f 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 c2fffa7..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,26 +317,6 @@ public final class JspRuntimeContext {
     }
 
 
-    /**
-     * Obtain the classloader to use when loading JSP resources. In development
-     * mode or when running background compilations, 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 (options.getDevelopment() || lastCheck > -1) {
-            return new JasperLoader(new URL[] {baseUrl}, parent,
-                    permissionCollection, codeSource);
-        }
-        if (jspLoader == null) {
-            jspLoader = new JasperLoader(new URL[] {baseUrl}, parent,
-                    permissionCollection, codeSource);
-        }
-        return jspLoader;
-    }
-
-
     // -------------------------------------------------------- Private Methods