FooController.java:
@RequestMapping(value = "/foo", method = RequestMethod.GET)
public final String foo(HttpServletRequest request, ModelMap model)
{
java.util.Date myDate = new java.util.Date();
model.addAttribute("myDate", myDate);
return "foo";
}
foo.jsp:
<%
java.util.Date myUtilDate = (java.util.Date)request.getParameter("myDate");
org.joda.time.DateTime myJodaDate = new org.joda.time.DateTime(myUtilDate);
%>
<joda:format value="${myJodaDate}" style="LL"/>
Why does the JSP scriptlet fail to obtain the myDate
value that was added to the ModelMap
in the FooController
?