最近使用Struts2+Spring3+Mybatis3做一个项目,在用户修改页面显示生日,
<fmt:formatDate value="${user.birthday}" pattern="yyyy-MM-dd"/>, 结果在jsp页面出现一个提示,“value does not support runtime expressions”, 如果你不理会这个提示,将出现下面这个错误org.apache.jasper.JasperException: /WEB-INF/user/PersonInfo.jsp(98,10) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
解决的方式:
将改为:<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>其他方式没做测试,有知道请说一声!<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

本文介绍了一个在Struts2+Spring3+Mybatis3项目中遇到的日期格式化显示问题及解决方案。主要问题是JSP页面上使用JSTL标签显示日期时出现错误提示,最终通过调整JSTL标签库的URI解决了该问题。
4913

被折叠的 条评论
为什么被折叠?



