EL表达式报错: According to TLD or attribute directive in tag file, attribute value does not accept any expressions:
在导入页面时,报如下错误:
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /out.jsp(32,10) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1186)
at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:840)
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1530)
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},就不会报错,并且打印成空值