I have a date input field in my jsp like this:
<form:input name="inputDate" id="inputDate" value="" path="date"/>
This form is mapped to a @ModelAttribute account which has the date defined like this:
private java.util.Date date ;
When I submit the form, I get an error (of course) that says:
Failed to convert property value of type java.lang.String to required
type java.util.Date …
Please suggest a way I can parse date in the JSP itself, so that the @ModelAttribute can directly set the date field with the value
Just register binder in your
@Controllerlike in this example: