I am trying to format a date with:
<fmt:formatDate value="${newsletter.createdOn}" pattern="MM/dd/yyyy"/>
newsletter is an object with a createdOn
property which is java.util.Date
.
When I invoke the previous sentence I get:
According to the TLD, the attribute value does not accept expressions.
I am importing fmt with
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>
Does anyone know how can I work around this problem?
I am using the jstl.jar coming with tomcat.
Under jstl.jar/META-INF/MANIFEST.MF stays:
Manifest-Version: 1.0 Ant-Version: Apache Ant 1.5.3 Created-By: 1.4.2-b28 (Sun Microsystems Inc.) Specification-Title: JavaServer Pages Standard Tag Library (JSTL) Specification-Version: 1.1 Implementation-Title: JavaServer Pages Standard Tag Library API Refere nce Implementation Implementation-Version: 1.1.0-D13 Implementation-Vendor: Sun Microsystems, Inc. Implementation-Vendor-Id: com.sun Extension-Name: javax.servlet.jsp.jstl
I am using Apache Tomcat Version 6.0.14
Try
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With