Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48737
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 9 Mar 2010 12:30:37 +0000 (12:30 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 9 Mar 2010 12:30:37 +0000 (12:30 +0000)
Don't assume paths that start with /META-INF/... are always in JARs. This is not true for some IDEs
Patch provided by Fabrizio Giustina

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

java/org/apache/jasper/JspCompilationContext.java

index 967c6c0..a3a8a4a 100644 (file)
@@ -294,6 +294,9 @@ public class JspCompilationContext {
             }
             if (jarUrl != null) {
                 result = new URL(jarUrl.toExternalForm() + res.substring(1));
+            } else {
+                // May not be in a JAR in some IDE environments
+                result = context.getResource(canonicalURI(res));
             }
         } else if (res.startsWith("jar:file:")) {
                 // This is a tag file packaged in a jar that is being checked