【问题标题】:JSTL and Format errorsJSTL 和格式错误
【发布时间】:2011-01-18 12:08:33
【问题描述】:

按照代码。

<c:set var="birthdate"  value="${requestScope.evaluation.employee.birthDate}"></c:set>
<fmt:formatDate pattern="ddMMyyyy"  type="both" value="${birthdate}"/>

错误: 自定义标记属性值不能是运行时表达式。值:“[${birthdate}]”

【问题讨论】:

  • 我们可以在 JSP 的顶部看到您的 taglib 声明吗?

标签: jsp jstl


【解决方案1】:

确保 JSTL fmt taglib 按照JSTL 1.1 documentation 声明:

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

注意/jsp 路径。

另见:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-04-12
    • 2011-06-20
    • 2017-03-29
    相关资源
    最近更新 更多