JSTL格式化日期时报错:According to TLD or attribute directive in tag file, attribute value does not accept an

详细错误:

org.apache.jasper.JasperException: /WEB-INF/jsp/profile.jsp (line: 39, column: 2) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
	org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41)
	org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:275)
	org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:107)
	org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1241)
	org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:879)
	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1536)
	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:898)
	org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1536)
	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:464)
	org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
	org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1853)
	org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
	org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
	org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:168)
	org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303)
	org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1282)
	org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)
	org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)
	org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
	org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)


解决方法:

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

改成:<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>


参考:http://blog.csdn.net/zhangshufei8001/article/details/47319833

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值