I am working on a webapp using jsp and servlets and I want to populate a date to HTML field which has the input type "Date".
I am pretty sure that my java code is getting the value for the input field and when I checked the value from "Inspect element" in browser, it shows that the value as expected. But the values are not visible in the field itself.
This is my jsp page's related field.
<input type="date" id="FeeStartDate" name="FeeStartDate" value = "'<%=Validation.formatDateForDateField(User.getFeeEndDate()) %>'">
As per below picture, value is there but it is not shown in the field. Why is that ? Any help is greatly appreciated.
Ps : I have tried like this as well but same result.
<input type="date" id="FeeStartDate" name="FeeStartDate" value = '<%=Validation.formatDateForDateField(User.getFeeEndDate()) %>'>
If needed, this is the java method.
public static String formatDateForDateField(Date dDate)
{
System.out.println("dDate 1 ==========> " + dDate);
SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");
System.out.println("dDate 2 ==========> " + sdf.format(dDate));
return sdf.format(dDate);
}
Thanks in advance.


''single quotes remove that .Also , try withyyyy-mm-ddformat .