Created attachment 37195 [details] patch for TagLibraryInfoImpl When the Jar Scanner is configured with scanAllDirectories, TldScanner will load tag library descriptors in /WEB-INF/classes/META-INF/ (@see TldScanner.TldScannerCallback#scanWebInfClasses) When a .tld references a tag-file, it MUST reference it as /META-INF/tags/blah.tag (attempting a relative path results in Illegal tag file path..., I guess that's a spec requirement) e.g. /WEB-INF/classes/META-INF/tags.tld <?xml version="1.0" encoding="UTF-8"?> <taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd" version="2.0"> <tlib-version>1.0</tlib-version> <short-name>tags</short-name> <tag-file> <name>bug</name> <path>/META-INF/tags/bug.tag</path> </tag-file> </taglib> A .tld living in /WEB-INF/classes referencing a tag-file in /META-INF/tags intends it to be loaded from /WEB-INF/classes/META-INF/tags in the same way that a .tag living in a jar is loaded from /META-INF inside the jar. HOWEVER the tag-file is instead loaded from /META-INF/tags at the root of the webapp, which of course can't be found. I think this should be resolved, as Tomcat appears to support .tlds in /WEB-INF/classes/META-INF. I also _think_ the solution is quite simple (hey sometimes it is!)... TagLibraryInfoImpl#createTagFileInfo knows the path and whether it's in a jar or not, so it can "correct" the path to have /WEB-INF/classes in front. I've attached a patch for this change. All the best, Karl
Looking at this now... Yes, it is a spec requirement (JSP.8.4.1) that for tags packaged in a JAR the path must always start with "/META-INF/tags/..."
Many thanks for the report and the patch. Your analysis looks to be spot on to me. Fixed in: - master for 10.0.0-M5 onwards - 9.0.x for 9.0.35 onwards - 8.5.x for 8.5.55 onwards
That's fantastic, thank you very much Mark.