title: Multiple forms in one jsp
body: <p>I have two form on one jsp page. The first form doesn't use the modelAttribute and the second one uses an modelAttribute. What the problem is, is that if I post the first form which I doesn't use the modelAttribute will claim an error that I haven't bind the modelAttribute.</p>
  
  <p>I have searched on the internet to look for solutions but I can't find one which was helpfull.</p>
  
  <p>changeAddress.jsp</p>
  
  <pre><code>&lt;form method="post"&gt;
       &lt;input type="hidden" name="id" value="0" /&gt;
       &lt;input type="submit" name="exist" value="send to this address" /&gt;
  &lt;/form&gt;
  &lt;form:form method="post" modelAttribute="addressForm"&gt;
       &lt;form:input path="street" /&gt;     
       &lt;input type="submit" name="add" value="send to this address" /&gt;  
  &lt;/form:form&gt;
  </code></pre>
  
  <p>OrderController.java</p>
  
  <pre><code>@RequestMapping(value="changeAddress",method = RequestMethod.GET)
  public ModelAndView showChangAddress(Model model)
  {
       model.addAttribute("addressForm", new AddressForm());
       return new ModelAndView("body.changeaddress");
  }
  
  @RequestMapping(value="changeAddress", params="add", method = RequestMethod.POST)
  public ModelAndView addChangAddress(@ModelAttribute("addressForm") @Valid AddressForm af, BindingResult result, Model model)
  {
       System.out.println("a");
       return new ModelAndView("body.changeaddress");
  }
  
  @RequestMapping(value="changeAddress", params="exist", method = RequestMethod.POST)
  public ModelAndView processChangAddress(@RequestParam(value="id") String id, Model model)
  {
       System.out.println("b");
       return new ModelAndView("body.changeaddress");
  }
  </code></pre>
  
  <p>Much appriciated for help :)</p>