I have a little problem with the JSP page. I use Stripes as a framework, but this should not be relevant. Basically, I have a bean that returns a date in the form of a GregorianCalendar via getter. I have to show this date in JSP. When I try:
<fmt:formatDate type="both" dateStyle="full" value="${myObject.itsGregorian}">
I get an exception saying that it cannot convert GregorianCalendar to Date .
I understand that fmt:formatDate formats a Date object, not a GregorianCalendar , but is there a way to wrap it? Since this is a destination, and I have a pre-encoded bean, I am not allowed to touch the bean, so I cannot convert its getter to date to return Date .
How can I solve this problem better?
source share