Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix JSP compiler warning: one JAR was scanned for TLDs yet contained no TLDs?

When starting the application or compiling JSP via ant, Tomcat 7 Jasper complains about superfluous or misplaced JAR file. I got below message

**compile-jsp:**    [jasper] Jul 31, 2012 7:15:15 PM org.apache.jasper.compiler.TldLocationsCache tldScanJar    [jasper] INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.  

how to Skipping unneeded JARs during scanning can improve startup time and JSP compilation time in tomcat?

how to enable better output?

like image 897
gowthaman Avatar asked Jan 17 '13 09:01

gowthaman


People also ask

What is TLD in jar?

If you want to redistribute your tag files or implement your custom tags with tag handlers written in Java, you must declare the tags in a tag library descriptor (TLD). A tag library descriptor is an XML document that contains information about a library as a whole and about each tag contained in the library.

What is TLD scanning in Tomcat?

On startup, Tomcat recursively scans the WEB-INF directories for TLD (Tag Library Descriptor) files. As a result, if a webapp has a lot of files under that directory, it slows down the startup process.


2 Answers

Tomcat 8.5. Inside catalina.properties, located in the /conf directory set:

tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\*.jar 

Or go into context.xml, located in Tomcat's /conf directory and add:

<JarScanner scanClassPath="false"/> 
like image 118
Alexey Nikitenko Avatar answered Sep 20 '22 16:09

Alexey Nikitenko


For Tomcat 8, I had to add the following line to tomcat/conf/logging.properties for the jars scanned by Tomcat to show up in the logs:

org.apache.jasper.servlet.TldScanner.level = FINE 
like image 21
Guno Heitman Avatar answered Sep 20 '22 16:09

Guno Heitman