title: Error : According to TLD, tag form:input must be empty, but is not
body: <p>I have a spring mvc form</p>
  
  <pre><code>&lt;form:form action="${actionUrl}" method="post" commandName="userAccountVO"&gt;
  &lt;form:input type="text" path="userName" value="${user.userName}"&gt;&lt;/input&gt;
  //other similar fields
  &lt;input type="submit" id="save_changes_button" value="" /&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p>In the controller that returns the view I have this code</p>
  
  <pre><code> model.addAttribute(user, userAccountVO);
   model.addAttribute("userAccountVO", new UserAccountVO());
   return "view";
  </code></pre>
  
  <p>But I get the error mentioned above If i put some value in input tag like this</p>
  
  <pre><code> &lt;form:input type="text" path="userName" value="${user.userName}"&gt;some text&lt;/input&gt;
  </code></pre>
  
  <p>Also, if i try to submit the form all the fields in the model attribute object is null.</p>
  
  <pre><code>  @RequestMapping(value = "/updateuser", method = RequestMethod.POST)
  public @ResponseBody
  GenericResponse updateUserAccount(
          @ModelAttribute("userAccountVO") UserAccountVO userAccountVO,
          BindingResult result) {
   //userAccountVO here is null, i guess it creates a new object
  }
  </code></pre>
  
  <p><a href="http://www.mkyong.com/spring-mvc/according-to-tld-tag-forminput-must-be-empty-but-is-not/" rel="nofollow">This</a> post says it is because I don't have a form backing object, but I do have. </p>
  
  <p>What could be the problem? Thanks in advance.</p>