我用的最新版的tomcat7 使用eclipse环境,在项目启动后 html文件是可以访问的,但是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 页面返回的jsp信息全部为空(head和body里面都是空白) ,这个问题纠结半天还是没解决,求大神指教
可以试试如下解决方法:
1.调整Tomcat对应类的log级别
修改${tomcat}/conf/log4j.properties
##解除类org.apache.jasper.compiler.TldLocationsCache的log
org.apache.jasper.compiler.TldLocationsCache.level=FINE
2.观察Tomcat日志打印信息
步骤1执行完后,重启Tomcat,观察Tomcat日志,会在日志中发现类似如下打印信息:
九月09,201310:55:37上午org.apache.jasper.compiler.TldLocationsCachetldScanJar
详细:NoTLDfileswerefoundin[file:/E:/devspace/xxt_login/WEB-INF/lib/json-lib-2.3-jdk15.jar].ConsideraddingtheJARtothetomcat.util.scan.DefaultJarScanner.jarsToSkipororg.apache.catalina.startup.TldConfig.jarsToSkippropertyinCATALINA_BASE/conf/catalina.propertiesfile.
九月09,201310:55:37上午org.apache.jasper.compiler.TldLocationsCachetldScanJar
详细:NoTLDfileswerefoundin[file:/E:/devspace/xxt_login/WEB-INF/lib/poi-3.8.jar].ConsideraddingtheJARtothetomcat.util.scan.DefaultJarScanner.jarsToSkipororg.apache.catalina.startup.TldConfig.jarsToSkippropertyinCATALINA_BASE/conf/catalina.propertiesfile.
3.调整${tomcat}/conf/catalina.properties,将提示的jar添加到不扫描清单中
tomcat.util.scan.DefaultJarScanner.jarsToSkip=<br/>bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,<br/>annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,<br/>catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,<br/>jasper.jar,jasper-el.jar,ecj-.jar,<br/>tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,<br/>tomcat-jni.jar,tomcat-spdy.jar,<br/>tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,<br/>tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,<br/>tomcat-jdbc.jar,<br/>tools.jar,<br/>commons-beanutils.jar,commons-codec*.jar,commons-collections*.jar,<br/>commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,<br/>commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,<br/>commons-math*.jar,commons-pool*.jar,<br/>jstl.jar,<br/>geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,<br/>ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,<br/>jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,<br/>xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,<br/>junit.jar,junit-.jar,ant-launcher.jar,<br/>json-lib-.jar,poi-.jar
【注意】
1.如果使用eclipseserver插件、Sysdeotomcat插件启动Tomcat,此配合可能无效
2.步骤1调整完后,最好清除下以下两个文件夹${tomcat}/conf/Catalina${tomcat}/work/Catalina
3.尽量使用号实现模式匹配,以避免因jar版本升级带来的重复修改代价
<spanstyle="color:#454545;font-family:tahoma,helvetica,arial;font-size:16px;line-height:21px;background-color:#FFF0D1;">页面中含有<!---->的注释去掉
from:<arel="nofollow">http://www.myexception.cn/ai/1462646.html
好像没用。。。。始终不能生成logs和work下的文件<divclass="ref">版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。