title: HTTP Status 400 – Bad Request when try to save Date to Data Base
body: <p>JSP page:
  </p>
  
  <pre><code>&lt;form:input path="comment"/&gt;&lt;br&gt;
  &lt;form:input path="date"/&gt;&lt;br&gt;
  &lt;input type="submit" value="Submit"/&gt;
  </code></pre>
  
  <p>
  Controller:</p>
  
  <pre><code> @PostMapping("/saveVisit")
  public String saveVisit(@ModelAttribute Visit visit){
      visitService.addVisit(visit);
      return "redirect:/visit/list";
  }
  </code></pre>
  
  <p>And Hibernate Session:</p>
  
  <pre><code> @Override
  @Transactional
  public void addVisit(Visit visit) {
      Session session = sessionFactory.getCurrentSession();
      session.save(visit);
  }
  </code></pre>
  
  <p>It works when there is no date input, because it can be NULL. </p>
  
  <p>How to preperty input the date and save it in Java Object java.util.date then save it into Data Base?</p>