Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51532
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 20 Jul 2011 19:41:18 +0000 (19:41 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 20 Jul 2011 19:41:18 +0000 (19:41 +0000)
JSP files with dependencies in JARs were recompiled on every access leading to poor performance.

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1148915 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/jasper/compiler/Compiler.java
webapps/docs/changelog.xml

index 0e442a2..3772862 100644 (file)
@@ -494,7 +494,13 @@ public abstract class Compiler {
         while (it.hasNext()) {
             Entry<String,Long> include = it.next();
             try {
-                URL includeUrl = ctxt.getResource(include.getKey());
+                String key = include.getKey();
+                URL includeUrl;
+                if (key.startsWith("jar:")) {
+                    includeUrl = new URL(key);
+                } else {
+                    includeUrl = ctxt.getResource(include.getKey());
+                }
                 if (includeUrl == null) {
                     return true;
                 }
index d30f6a1..1d1afa4 100644 (file)
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Jasper">
+    <changelog>
+      <fix>
+        <bug>51532</bug>: JSP files with dependencies in JARs were recompiled on
+        every access leading to poor performance. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Web applications">
     <changelog>
       <fix>