title: Spring MVC and Error 400: SRVE0295E
body: <p>I have problem with simple MVC application.</p>
  
  <pre><code>dayoff.html
  &lt;div id="dayoff_operations" class="big_box_1"&gt;
      &lt;form:form modelAttribute="dayOff" enctype="multipart/form-data" action="/dayoff.html" &gt;
          &lt;div style="width: 50%; float: left; margin-top: 0px "&gt;
              &lt;form:label path="forDate" &gt;&lt;spring:message code="dayoff.fordate.label"/&gt;&lt;/form:label&gt;
              &lt;form:input path="ax_forDate" id="datepicker" style="width:65px" readonly="readonly"/&gt;&amp;nbsp;&amp;nbsp;
          &lt;/div&gt;
          &lt;div style="width: 50%; float: right; margin-top: 0px "&gt;
              &lt;form:label path="toDate" &gt;&lt;spring:message code="dayoff.todate.label"/&gt;&lt;/form:label&gt;
              &lt;form:input path="ax_toDate" id="datepicker2" style="width:65px" readonly="readonly" /&gt;&amp;nbsp;&amp;nbsp;
          &lt;/div&gt;
          &lt;div style="float: left"&gt;
              &lt;form:select cssClass="more" path="dayofftype" items="${dayoffTypes.list}" itemLabel="label" itemValue="value" htmlEscape="false" cssErrorClass="errorsField"/&gt;
              &lt;form:errors path="dayofftype" cssClass="errors"/&gt;
          &lt;/div&gt;
          &lt;input type="submit" name="add" value="Add"/&gt;
      &lt;/form:form&gt;
  </code></pre>
  
  <p>Here is my controller:</p>
  
  <pre><code>@Controller
  @RequestMapping("/dayoff")
  @SessionAttributes(types = {DayOff.class})
  public class DaysOffController {
  private Validator validator;
  @Autowired
  private ReloadableResourceBundleMessageSource messages;
  
  @ModelAttribute("dayoffTypes")
  public Map&lt;String, Object&gt; populateDayoffTypes(Locale locale) {
      return Utils.createComboMap(DayoffType.values(), messages, locale);
  }
  
  @RequestMapping(method = RequestMethod.GET)
  public String setupForm(Model model) {      
      model.addAttribute("dayOff", new DayOff());
      model.addAttribute("cur_period",SessionManager.getCurrentPeriod());
      return "dayoff";
  }
  
  @RequestMapping(method = RequestMethod.POST, params = "add")
  public String addNewHoliday(@ModelAttribute DayOff dayOff, BindingResult result, ModelMap model) {
      System.out.println("AAA");
      return "/dayoff";
  }
  </code></pre>
  
  <p>When I click Add button Error 400: SRVE0295E: Error reported: 400 appears, there is no information at server console.
  I assume it is realted to the setupForm() method which is displaying the form and crushing it to future submits. Can you please guide me with this?</p>