我不太确定表达式有什么问题
${exception.class.simpleName eq 'AccessDeniedException'}
但它给了我一个javax.el.ELException
.
org.apache.jasper.JasperException: /WEB-INF/jsp/exception/AccessDeniedException.jsp (line: 45, column: 28) "${exception.class.simpleName eq 'AccessDeniedException'}" contains invalid expression(s): javax.el.ELException: Failed to parse the expression [${exception.class.simpleName eq 'AccessDeniedException'}]
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:199)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1223)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:875)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:894)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1795)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
我使用 Tomcat 7 作为 Spring 的 tc Server 2.7 的一部分,因此使用 javax.el 2.2 版。