myjsp.jsp: HELLO <tag1/> tag1.tag: <tag2> tag2.tag: WORLD Crashes (null pointer) while trying to load tag2.class, called by TagFileProcessor.loadTagFile. Very Initial analysis:- TagFileProcessor.loadTagFile creates wrapper, but ctxt.getTagFileJarUrl (tagFilePath) returns null for nested .tag. Thus in JspCompilationContext.Compile JspCCtx.isPackagedFile == false, so outDated test is wrong So tag2.tag not compiled, thus class cannot be loaded. But problem also appears if tags not packaged in a .jar, so there is more going on. Work around is to create dummy.jsp that calls the .tags in leaf first order so .class files are created.
Correction: Problem ONLY appears if nested tag is in a jar file.
The bug appears to be in Parser.parseTaglibDirective. A JspCompilerContext instance is created for each JSP and each Tag file processed. The tag file url map is stored here, not globally. This is what JspCompilerContext.compile uses. But Parser.parseTaglibDirective only calls TagLibraryInfoImpl() once per JSP, not and not for the sub tag files. So the map is never populated. A hack workaround it to set caching="false" in the <jspc ...> command. I'm not sure what the full implications of doing this are. From here I think a proper fix should be fairly straight forward.
This is fixed in svn and will be included in 6.0.16 onwards.