扫描了至少一个JAR,但没有TLD [英] At least one JAR was scanned for TLDs yet contained no TLDs

查看:20960
本文介绍了扫描了至少一个JAR,但没有TLD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继续在tomcat上收到7.30(eclipse juno)

I keep getting this on tomcat 7.30 (eclipse juno)


至少有一个JAR扫描了TLD,但不包含TLD。为此记录器启用
调试日志记录,以查看
扫描的完整列表,但没有发现TLD。在
扫描期间跳过不需要的JAR可以提高启动时间和JSP编译时间。

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.

我去了$ code > conf\logging.properties 并将所有 INFO 转换为 FINE 并取消注释行

Well I went at conf\logging.properties and turned all INFO to FINE and uncommented the line

# To see debug messages in TldLocationsCache, uncomment the following line:
org.apache.jasper.compiler.TldLocationsCache.level = FINE

我仍然看到至少有一个JAR被扫描TLD尚未包含TLD。启用调试日志记录...

那么我该怎么办才能看到这些jar?

So what should I do to see those jars ?

日志位置:

tomcat日志在$ CATALINA_HOME\logs\catalina.yyyy-mm-dd.log中。 Eclipse将其打印在控制台中 - 如果要控制台记录您必须

The tomcat logs are in $CATALINA_HOME\logs\catalina.yyyy-mm-dd.log. Eclipse prints them in the console - if you want to have your console logged you must


在服务器选项卡中,双击Tomcat服务器。 200新新新新旗新新新新旗新新旗新新旗新新旗新新旗新新旗200新新新新旗新新200新新旗新新旗新新旗新新旗旗点击打开启动配置。新新200新新旗新新新新旗新新旗新新旗新新旗新200新新新新旗新新旗新新旗新新旗新新旗新新旗新新旗新旗新在屏幕底部,您可以检查
文件复选框,然后指定一个可用于记录
控制台(catalina.out)输出的文件。最后,重新启动Tomcat服务器。

In the servers tab, double-click on the Tomcat Server. You will get a screen called Overview. Click on "Open launch configuration". Click on the "Common" tab. Towards the bottom of the screen you can check the "File" checkbox and then specify a file that can be used to log your console (catalina.out) output. Finally, restart the Tomcat server.


推荐答案

如果想要拥有 conf\logging.properties 阅读必须(另见< a href =http://happygiraffe.net/blog/2008/08/01/tomcat-logging-in-wtp/> here )将此文件转储到 Servers\ Tomcat v7.0 Server在localhost-config\ 文件夹,然后添加以下行:

If one wants to have the conf\logging.properties read one must (see also here) dump this file into the Servers\Tomcat v7.0 Server at localhost-config\ folder and then add the lines :


-Djava。 util.logging.config.file =$ {workspace_loc} \Servers\Tomcat v7.0 Server at localhost-config \logging.properties-Djava.util.logging.manager = org.apache.juli.ClassLoaderLogManager

-Djava.util.logging.config.file="${workspace_loc}\Servers\Tomcat v7.0 Server at localhost-config\logging.properties" -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

启动配置一个正在使用。

这可能已经重新启动或两次(或不是)但是最后我在控制台中看到了鲜艳的红色:

This may have taken a restart or two (or not) but finally I saw in the console in bright red :


精细:没有在[file:/ C:/ Dropbox]中找到TLD文件/eclipse_workspaces/javaEE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ted2012/WEB-INF/lib/logback-classic-1.0.7.jar。考虑将JAR添加到CATALINA_BASE / conf / catalina.properties文件中的tomcat.util.scan.DefaultJarScanner.jarsToSkip或org.apache.catalina.startup.TldConfig.jarsToSkip属性。 // etc

FINE: No TLD files were found in [file:/C:/Dropbox/eclipse_workspaces/javaEE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ted2012/WEB-INF/lib/logback-classic-1.0.7.jar]. Consider adding the JAR to the tomcat.util.scan.DefaultJarScanner.jarsToSkip or org.apache.catalina.startup.TldConfig.jarsToSkip property in CATALINA_BASE/conf/catalina.properties file. //etc

我还不知道这个 FINE 警告出现 - 在tomcat启动时不会立即出现 编辑:从@Stephan的评论:每当JSP文件中进行任何更改时,都会出现FINE警告

I still don't know when exactly this FINE warning appears - does not appear immediately on tomcat launch EDIT: from the comment by @Stephan: "The FINE warning appears each time any change is done in the JSP file".

奖金:要使警告消失,加入 catalina。属性

Bonus: To make the warning go away add in catalina.properties :

# Additional JARs (over and above the default JARs listed above) to skip when
# scanning for TLDs. The list must be a comma separated list of JAR file names.
org.apache.catalina.startup.TldConfig.jarsToSkip=logback-classic-1.0.7.jar,\
joda-time-2.1.jar,joda-time-2.1-javadoc.jar,mysql-connector-java-5.1.24-bin.jar,\
logback-core-1.0.7.jar,javax.servlet.jsp.jstl-api-1.2.1.jar

这篇关于扫描了至少一个JAR,但没有TLD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆