According to TLD or attribute directive in tag file, attribute value does not accept any expressions

Posted yxwkaifa

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了According to TLD or attribute directive in tag file, attribute value does not accept any expressions相关的知识,希望对你有一定的参考价值。

1、错误描写叙述

2014-7-13 17:27:21 org.apache.jasper.compiler.TldLocationsCache tldScanJar
信息: 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.
2014-7-13 17:27:21 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [jsp] in context with path [/FirstSSH] threw exception [/pages/pathTags.jsp (line: 11, column: 0) According to TLD or attribute directive in tag file, attribute value does not accept any expressions] with root cause
org.apache.jasper.JasperException: /pages/pathTags.jsp (line: 11, column: 0) 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:42)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:443)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:149)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1241)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:876)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1538)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2433)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:474)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:536)
	at org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:638)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2427)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2433)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:474)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2375)
	at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1825)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:657)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:619)

2、错误原因

        JSTL core库的有两种taglib伪指令, 当中RT库即是依赖于JSP传统的请求时属性值, 而不是依赖于EL来实现(称为EL库.JSP2.0将支持EL)
JSP中使用<%@ taglib uri=http://java.sun.com/jstl/core prefix="c"%>在2.3版本号都能够,在2.4就不行了


3、解决的方法

     将下面一句:

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

     改成

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

     就能够了


以上是关于According to TLD or attribute directive in tag file, attribute value does not accept any expressions的主要内容,如果未能解决你的问题,请参考以下文章

According to TLD or attribute directive in tag file, attribute value does not accept any expressions

According to TLD or attribute directive in tag file, attribute value does not accept any expressions

jstl 中无法使用EL语句。异常信息:According to TLD or attribute directive in tag file, attribute value does not ac

Attribute class invalid for tag present according to TLD

Struts的莫名问题解决方法:Attribute class invalid for tag present according to TLD

English - according to 的用法说明