EL表达式报错: According to TLD or attribute directive in tag file, attribute value does not accept any ex

EL表达式报错: According to TLD or attribute directive in tag file, attribute value does not accept any expressions: java

在导入页面时,报以下错误: express

 严重: Servlet.service() for servlet jsp threw exception apache

org.apache.jasper.JasperException: /out.jsp(32,10) According to TLD or attribute directive in tag file, attribute value does not accept any expressions jsp

at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) spa

at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) get

at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148) 源码

at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1186) servlet

at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:840) it

at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530) io

at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)

at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2411)

at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2417)

at org.apache.jasper.compiler.Node$Root.accept(Node.java:495)

at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2361)

 

查看源码是el表达式有引入空值${null} ,因此报错;

更改下引入jstl标签库

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

改为

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>

 

这样${null},就不会报错,而且打印成空值



相关文章
相关标签/搜索