Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 8.0.4
-
Fix Version/s: None
-
Component/s: JSP
-
Labels:None
-
Patch Submitted:Yes
-
Number of attachments :
Description
If you deploy a web exploded application with a TLD to a tag-file you will get a NPE, because the jarFileUrl argument is "null".
The NPE will occur on:
private TagFileInfo createTagFileInfo(TreeNode elem, String uri, URL jarFileUrl) throws JasperException
{ ... ctxt.getTagFileJarUrls().put(path, jarFileUrl); ... }where the second "jarFileUrl" cannot be NULL when putting it onto the hashmap.
Also see the tomcat patch over at:
http://tomcat.10.n6.nabble.com/svn-commit-r492263-tomcat-jasper-tc5-5-x-src-share-org-apache-jasper-compiler-TagLibraryInfoImpl-java-td2219260.html
This is a shameless copy/paste of the patch:
if (path.startsWith("/META-INF/tags")) {
// Tag file packaged in JAR
ctxt.getTagFileJarUrls().put(path, jarFileUrl);
+ // check if jarFileUrl is not null before adding it, or this will
+ // cause a NPE.
+ if (jarFileUrl != null)
} else if (!path.startsWith("/WEB-INF/tags"))
{ err.jspError("jsp.error.tagfile.illegalPath", path); }Also tracking this over at glassfish:
http://java.net/jira/browse/GLASSFISH-18391