Author: remy.maucherat(a)jboss.com
Date: 2009-10-22 08:05:13 -0400 (Thu, 22 Oct 2009)
New Revision: 1219
Modified:
trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
Log:
- Fix JAR URLs.
Modified: trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 2009-10-21 21:03:01 UTC
(rev 1218)
+++ trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 2009-10-22 12:05:13 UTC
(rev 1219)
@@ -569,10 +569,10 @@
URL tagFileJarUrl = null;
if (tagFilePath.startsWith("/META-INF/")) {
- try {
- tagFileJarUrl = new URL("jar:" +
- compiler.getCompilationContext().getTldLocation(
- tagInfo.getTagLibrary().getURI())[0] + "!/");
+ try {
+ String[] location =
compiler.getCompilationContext().getTldLocation(tagInfo.getTagLibrary().getURI());
+ URL jarUrl =
compiler.getCompilationContext().getServletContext().getResource(location[0]);
+ tagFileJarUrl = new URL("jar:" + jarUrl + "!/");
} catch (MalformedURLException e) {
// Ignore ...
}
Modified: trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-21 21:03:01 UTC
(rev 1218)
+++ trunk/java/org/apache/jasper/compiler/TagLibraryInfoImpl.java 2009-10-22 12:05:13 UTC
(rev 1219)
@@ -161,7 +161,10 @@
}
if (location[0] != null && location[0].endsWith(".jar")) {
try {
- jarFileUrl = new URL("jar:file:" + location[0] +
"!/");
+ URL jarUrl = ctxt.getServletContext().getResource(location[0]);
+ if (jarUrl != null) {
+ jarFileUrl = new URL("jar:" + jarUrl + "!/");
+ }
} catch (MalformedURLException ex) {
err.jspError("jsp.error.file.not.found", uriIn);
}
Show replies by date