From: markt Date: Mon, 28 Jan 2008 21:05:04 +0000 (+0000) Subject: Revert attempt to fix 43878 since patch is obviously wrong. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=a171adbf7422f98401bd5b6a363f6a480e916e84;p=tomcat7.0 Revert attempt to fix 43878 since patch is obviously wrong. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@616042 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/jasper/JspCompilationContext.java b/java/org/apache/jasper/JspCompilationContext.java index 0fe40f3db..b98e6fe35 100644 --- a/java/org/apache/jasper/JspCompilationContext.java +++ b/java/org/apache/jasper/JspCompilationContext.java @@ -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; } diff --git a/java/org/apache/jasper/compiler/JspRuntimeContext.java b/java/org/apache/jasper/compiler/JspRuntimeContext.java index 2a739875a..6e4fe069b 100644 --- a/java/org/apache/jasper/compiler/JspRuntimeContext.java +++ b/java/org/apache/jasper/compiler/JspRuntimeContext.java @@ -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