当启动应用程序或通过ant编译JSP时,Tomcat 7 Jasper抱怨说JAR文件多余或放错了位置。我得到的信息如下
**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.
如何在扫描过程中跳过不需要的JAR,以改善Tomcat的启动时间和JSP编译时间?
如何启用更好的输出?
对于Tomcat 8,我不得不在tomcat/conf/logging.properties
中添加以下一行,以便Tomcat扫描的jars能显示在日志中:
org.apache.jasper.servlet.TldScanner.level = FINE
上述解决方案对我不起作用。 我只是把logging.properties文件最后一行中的hash(#)去掉,就可以了。
# To see debug messages in TldLocationsCache, uncomment the following line:
org.apache.jasper.compiler.TldLocationsCache.level = FINE
下一步是在catalina.properties文件中添加Tomcat 7正在寻找的jars,就在下面一行之后
org.apache.catalina.startup.TldConfig.jarsToSkip=
取消对这一行的注释(在/conf/logging.properties
中)。
org.apache.jasper.compiler.TldLocationsCache.level = FINE
在tomcat 7.0.53中对我有用!