I created a java.util.Date object named myDate in my controller and passed it to my JSP, where I have the Joda Time JSP tag configured with this at the top of the page:
<%@taglib prefix="joda" uri="http://www.joda.org/joda/time/tags" %>
and, of course, the necessary Maven dependencies added to the project through the POM file.
However, when I try to access myDate from the JSP as follows:
<joda:format value="${myDate}" style="SM" />
I get this error:
javax.servlet.jsp.JspException: value attribute of format tag must be a ReadableInstant or ReadablePartial, was: java.util.Date
Referring to the documentation for Joda JSP tags , I canβt say how can I "convert" my myDate to ReadableInstant or ReadablePartial in the context of this JSP?
java date jsp jodatime
Sam bricket
source share