I am facing currently a huge issue : I can not retrieve date input by user in JSP page.
JSP code :
<form:form method="POST" action="myAction">
<tr><td>Date</td>
<td>
<spring:nestedPath path="myClasse.startDate" >
<input type="text" name="startDate" value="<c:out value="${status.value}"/> "/></spring:nestedPath>
</td></tr>
I input date in all existing forms. my code part corresponding to the retrieval of startDate in the Controller:
System.out.println("date: " + myClasse.getStartDate());
give me null
Here are some details that can help :
I have this in my model class :
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "start_date", length = 19)
public Date getStartDate()
{
return this.startDate;
}
public void setStartDate(Date startDate)
{
this.startDate = startDate;
}
Service class :
session.createQuery("SELECT DISTINCT name where startDate=:startDate").setParameter("startDate", "startDate");