title: @ModelAttribute parameter not being populated
body: <p>I have a controller in which I have a GET method display a form POJO, which is to be captured by a corresponding POST. However, when the POST request is executed, the form POJO is created but never populated, and no errors are shown (besides validation errors for the nulls).</p>
  
  <p>I'm using Spring 3.0.</p>
  
  <pre><code>@Controller
  public class UserController {
   @RequestMapping(value = "/register", method = RequestMethod.GET)
   public ModelAndView renderRegisterForm(
     @ModelAttribute("registerForm") UserRegisterForm registerForm) {
  
    ModelAndView mav = new ModelAndView("user.register");
    mav.addObject("registerForm", registerForm);
  
    return mav;
   }
  
   @RequestMapping(value = "/register", method = RequestMethod.POST)
   public ModelAndView registerForm(
     HttpServletRequest request,
     @Valid @ModelAttribute("registerForm") UserRegisterForm registerForm,
     BindingResult results) {
  
    // All fields in registerForm are null, results has errors for the @NotNull annotations
  
    return new ModelAndView("user.register");
   }
  }
  </code></pre>
  
  <p>My view is preety simple, using spring forms to create the form:</p>
  
  <pre><code>&lt;form:form cssClass="registerForm" modelAttribute="registerForm" method="post" action="/register"&gt;
  
    &lt;div class="inputContainer"&gt;
     &lt;form:label path="name"&gt;
     &lt;spring:message code="user.edit.name"/&gt;
     &lt;/form:label&gt;
     &lt;form:input path="name"/&gt;
     &lt;form:errors path="name" cssClass="error"&gt;&lt;/form:errors&gt;
    &lt;/div&gt;
  
    &lt;div class="inputContainer"&gt;
     &lt;form:label path="email"&gt;
     &lt;spring:message code="user.edit.email"/&gt;
     &lt;/form:label&gt;
     &lt;form:input path="email"/&gt;
     &lt;form:errors path="email" cssClass="error"&gt;&lt;/form:errors&gt;
    &lt;/div&gt;
  
    &lt;div class="inputContainer"&gt;
     &lt;form:label path="password"&gt;
     &lt;spring:message code="user.edit.password"/&gt;
     &lt;/form:label&gt;
     &lt;form:password path="password"/&gt;
     &lt;form:errors path="password" cssClass="error"&gt;&lt;/form:errors&gt;
    &lt;/div&gt;
  
    &lt;div class="inputContainer"&gt;
     &lt;form:label path="repeatPassword"&gt;
     &lt;spring:message code="user.edit.repeatPassword"/&gt;
     &lt;/form:label&gt;
     &lt;form:password path="repeatPassword"/&gt;
     &lt;form:errors path="repeatPassword" cssClass="error"&gt;&lt;/form:errors&gt;
    &lt;/div&gt;
  
    &lt;div class="submit-button"&gt;
           &lt;input  type="submit" value="&lt;spring:message code="register"/&gt;"/&gt;
          &lt;/div&gt;  
  &lt;/form:form&gt;
  </code></pre>
  
  <p>and the form itself...</p>
  
  <pre><code>@FieldMatchList({@FieldMatch(first="password", second="repeatPassword")})
  public class UserRegisterForm {
  
   @NotNull
   @Size(min = 1, max = 50)
   private String name;
  
   @NotNull
   @Email
   @Size(max=100)
   private String email;
  
   @NotNull
   @Size(min=6, max=32)
   private String password;
  
   @NotNull
   @Size(min=6, max=32)
   private String repeatPassword;
  
   // Getters and setters...
  }
  </code></pre>
  
  <p>Thanks in advance!</p>