Bug 58076 - Embedded tomcat would not find tlds on open dependency artifacts
Summary: Embedded tomcat would not find tlds on open dependency artifacts
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 8.0.23
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-25 23:36 UTC by Rafael Mattos
Modified: 2015-07-27 09:27 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Mattos 2015-06-25 23:36:18 UTC
When the embedded container scans the classpath for the TLDs using the StandardJarScanner (line 199) it verifies if the Classpath entry is a jar or if should scanAllFiles (by default its false). On eclipse, when you have a open artifact, the classloader (WebAppClassLoader) will load its url as file://path/to/workspace/project/classes, the scanner will ignore that entry and that will generate error when accessing jsps that need the tld.

If you set the scanAllFiles to true, the scan finds the TLD, and creates the TldResourcePath without a entry name. When jasper tries to compile the JSP that uses a tag defined in the TLD, it parses the taglib it creates a TagLibraryInfoImpl. When JspUtil.getInputStream tries to load the file to determine the enconding it throws FileNotFound cause it tries to search only with relative path (Ex: /META-INF/tld.tld) instead of using the full path file://path/to/workspace/project/classes/META-INF/tld.tld

Shouldnt the absFileName be the complete path instead of the relative?

I dont know if is a bug or a feature
Comment 1 Mark Thomas 2015-06-26 06:51:51 UTC
If you can provide the steps to reproduce this bug on a clean install of the latest stable Tomcat 8.0.x release then this is a Tomcat bug. Otherwise it looks like a bug in the Eclipse integration (not something the Tomcat team is involved in).

Without steps to reproduce this issue in a stand-alone Tomcat installation this issue will be resolved as invalid.
Comment 2 Mark Thomas 2015-07-27 09:27:59 UTC
No information provided after a month, therefore closing as INVALID.