title: Send date parameter from html form to controller in thymeleaf
body: <p>I am facing the below problem while passing date to controller, if I remove the date then its working correctly.</p>
  
  <p>My html code is </p>
  
  <pre><code>&lt;div class="form-group" id="all"&gt;
      &lt;label class="col-lg-2 control-label" for="focusedInput3"&gt;Start date&lt;/label&gt;
      &lt;div class="col-lg-10"&gt;
          &lt;input type="date" id="startDate" name="startDate" th:value="*{startDate}" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="form-group" id="all"&gt;
      &lt;label class="col-lg-2 control-label" for="focusedInput4"&gt;End date&lt;/label&gt;
      &lt;div class="col-lg-10"&gt;
          &lt;input type="date" id="endDate" name="endDate" th:value="*{endDate}" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and my Entity class is </p>
  
  <pre><code>@Column(name = "name")
  private String courseName;
  
  @Column(name = "semister")
  private String semister;
  
  @Temporal(TemporalType.TIMESTAMP)
  @DateTimeFormat (pattern="dd-MMM-YYYY")
  @Column(name = "startDate")
  private Date startDate;
  
  @Temporal(TemporalType.TIMESTAMP)
  @DateTimeFormat (pattern="dd-MMM-YYYY")
  @Column(name = "endDate")
  private Date endDate;
  </code></pre>
  
  <p>after clicking on submit button, the following error occurs:</p>
  
  <p><img src="https://i.stack.imgur.com/cd4OM.png" alt="enter image description here"> </p>
  
  <pre><code>Whitelabel Error Page
  
  This application has no explicit mapping for /error, so you are seeing  this as a fallback.
  
  Fri Apr 24 14:05:33 IST 2015
  There was an unexpected error (type=Not Found, status=404).
  No message available
  </code></pre>
  
  <p>Here is my controller</p>
  
  <pre><code>@Controller
  @RequestMapping("/admin")
  public class CourseScheduleController {
  
  @Autowired
  private CourseScheduleService courseScheduleService; 
  
  @RequestMapping("/createCourse")
  public ModelAndView getAllativities() {
      Map&lt;String, Object&gt; model = new HashMap&lt;String, Object&gt;();
      model.put("courseName", "");
      model.put("semister", "");
      model.put("startDate",null);
      model.put("endDate",null);
      return new ModelAndView("createCourse",model);
  }
  
  @RequestMapping("/saveCourse")
  public String saveCourseSchedule(@ModelAttribute CourseBE courseBE){
      courseScheduleService.saveCourseSchedule(courseBE);
      return "redirect:/admin/createCourse";
  }
  </code></pre>
  
  <p>Please help me out to resolve this issue.</p>