Thanks for the reference. So according to the spec [1], TLDs are scanned in 
JARs in WEB-INF/lib only. That explains why the TLDs of jstl-1.2.jar are not 
picked up when in the common classloader location. However 1 states that the 
container builds a map of platform TLDs. So I guess JSTL is not part of 
"JavaServer Pages Standard Tag Library"... Also, wouldn't the container build 
implicitly the Map Entries from forcing it to scan via
tomcat.util.scan.StandardJarScanFilter.jarsToScan=... jstl*.jar...?

George


[1] 
The following order of precedence applies (from highest to lowest) when
building the taglib map (see the following sections for details):
1. If the container is Java EE platform compliant, the Map Entries for the tag 
libraries that are part of the Java EE platform. This currently includes the 
JavaServer Pages Standard Tag Library libraries and the JavaServer Faces
libraries.
2. Taglib Map in web.xml
3. Implicit Map Entries from TLDs
■ TLDs in JAR files in WEB-INF/lib
■ TLDs under WEB-INF
4. Implicit Map Entries from the Container



-----Original Message-----
From: Konstantin Kolinko <knst.koli...@gmail.com> 
Sent: Wednesday, October 21, 2020 4:07 AM
To: Tomcat Users List <users@tomcat.apache.org>
Subject: Re: jstl jar location

вт, 20 окт. 2020 г. в 22:31, George Stanchev <george.stanc...@microfocus.com>:
>
>
> I am hoping someone can shed some lights on a question. I did try to search 
> online and SO but haven't had luck in figure it out so hopefully it is a 
> quick answer from the people that know that stuff. We have an uber-lib folder 
> where we keep shared libraries in our TC85-hosted app. If we put jstl-1.2.jar 
> into that directory but not in the application /WEB-INF/lib directory, TC 
> generates [1]. If I move jstl into the application lib folder, it works. I 
> made sure jstl is excluded from jarsToSkip and included in jarsToScan.
>
> Is there any rule or switch that says that the JSP compiler cannot use the 
> parent CL to resolve the jstl URIs?

There is a rule how JSP engine locates Tag Library Descriptor (TLD) files.

See chapters "JSP.7.2 Tag Libraries", "JSP.7.3 The Tag Library Descriptor".
Especially the "order of precedence" list in chapter "JSP.7.3.2 TLD resource 
path".

It looks that you are relying on implicit declarations.of TLDs.

https://cwiki.apache.org/confluence/display/TOMCAT/Specifications

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to