RE: jstl jar location

2020-10-21 Thread George Stanchev
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  
Sent: Wednesday, October 21, 2020 4:07 AM
To: Tomcat Users List 
Subject: Re: jstl jar location

вт, 20 окт. 2020 г. в 22:31, George Stanchev :
>
>
> 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



Re: jstl jar location

2020-10-21 Thread Konstantin Kolinko
вт, 20 окт. 2020 г. в 22:31, George Stanchev :
>
>
> 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



Re: jstl jar location

2020-10-21 Thread Mark Thomas
On 20/10/2020 20:30, George Stanchev wrote:
> 
> 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?

I don't recall anything but I haven't checked the code or the specs for
a definitive answer.

How are you ensuring that the uber-lib folder is visible to web
applications?

Mark


> 
> George
> 
> 
> 
> [1]
> Type Exception Report
> Message The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be 
> resolved in either web.xml or the jar files deployed with this application
> Description The server encountered an unexpected condition that prevented it 
> from fulfilling the request.
> Exception
> org.apache.jasper.JasperException: The absolute uri: 
> [http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or 
> the jar files deployed with this application
>  
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)
> 
> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293)
> 
> org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80)
> org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:251)
> 
> org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:122)
> 
> org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
> org.apache.jasper.compiler.Parser.parseDirective(Parser.java:489)
> org.apache.jasper.compiler.Parser.parseElements(Parser.java:1445)
> org.apache.jasper.compiler.Parser.parse(Parser.java:144)
> 
> org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)
> 
> org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
> org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:375)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:335)
> 
> org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597)
> 
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
> 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
> org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)
> 
> org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:304)
> 
> org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1286)
> org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1041)
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984)
>   
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
> 
> org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
> 
> 

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



jstl jar location

2020-10-20 Thread George Stanchev

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?

George



[1]
Type Exception Report
Message The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be 
resolved in either web.xml or the jar files deployed with this application
Description The server encountered an unexpected condition that prevented it 
from fulfilling the request.
Exception
org.apache.jasper.JasperException: The absolute uri: 
[http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the 
jar files deployed with this application
 
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:293)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:80)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTldResourcePath(TagLibraryInfoImpl.java:251)

org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:122)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:489)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1445)
org.apache.jasper.compiler.Parser.parse(Parser.java:144)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:244)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:105)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:203)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:375)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:335)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)

org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:304)

org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1286)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1041)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:984)
  
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:901)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)

org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)