According to TLD or attribute directive in tag file, attribute [value] does not accept any expressio

jsp在使用标签下面的标签时报错


我的标签声明如下

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

于是就报错了

严重: Servlet.service() for servlet [jsp] in context with path [/jcmh] threw exception [/main/index.jsp (line: [7], 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: /main/index.jsp (line: [7], 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:41)
	at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:291)
	at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1241)
	at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:879)
	at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1545)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2444)
	at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2450)
	at org.apache.jasper.compiler.Node$Root.accept(Node.java:471)
	at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2392)
	at org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1853)
	at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:221)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)
	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:335)
	at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:601)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:368)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1455)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)

查找原因,发现是标签的URI地址了,改为如下内容就不报错了

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

你可能感兴趣的:(Java,web开发,异常处理,JSP网站程序,JSP网站后台系统)