At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for 。。。

时间:2021-01-25 09:11:20

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.


1.检查jsp版本

如果是2.3版本,则xml指令和文档类型定义如下:(不支持EL表达式)

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

"http://java.sun.com/dtd/web-app_2_3.dtd">

如果是2.4版本,则为:(开始支持)
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee  

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">


2.web.xml中,是否停用了jsp表达式语言
<jsp-config>
<jsp-property-group>
<url-pattern>/legacy/*.jsp</url-pattern>
<el-ignored>true</el-ignored>
</jsp-property-group>
</jsp-config>

这种情况的解决方法就是把<el-ignored>true</el-ignored>改为<el-ignored>false</el-ignored>

3.在版本正确的前提下,有三种解决方案可供参考:
第一种:严格遵守java规范,修改对象的属性名称,要求不包含java关键字; 
第二种:修改EL表达式,例如"${owner.new}"可以修改为"${owner['new']}"; 
第三种:修改tomcat属性,忽略对EL表达式的关键字检查。修改$CATALINA_BASE/conf/catalina.properties文件,添加org.apache.el.parser.SKIP_IDENTIFIER_CHECK=true选项。