title: seems like @ModelAttribute does not help in keeping values of a form after submission
body: <p>There are some questions about similar problem to mine but none of them helped me.I have a form that its fields get empitied after submission, I am using @ModelAttribute and I suppose it should keep the values but it does not. I also used @SessionAttributes("contact") but it did not help.
  Commented parts of the code are some of the methods that Ive tried already.</p>
  
  <p>How to keep values of a form after submission?</p>
  
  <pre><code>@RequestMapping(value = "/contact", method = RequestMethod.GET)
      public ModelAndView contactForm() {
          return new ModelAndView("contact", "command", new Contact());
      }
  
  
  
      @RequestMapping(value = "/contact", method = RequestMethod.POST)
  public String processForm(
          @Valid @ModelAttribute("Contact") Contact contact,
          BindingResult result, SessionStatus status, Model m) {
      if (result.hasErrors()) {
          System.err.println("errors");
  
      } else {
          System.err.println("Contact Name is:" + contact.getName());
          m.addAttribute("message", "Successfully added");
          // m.addAttribute("name", "Jack"); // does not work
          // m.addAttribute("contact.name", "Jack"); // does not work
          // m.addAttribute(contact); //does not work
  
          // status.setComplete();
  
      }
      // return new ModelAndView("contact", "command", contact); // the page wont be shown at all
      return "contact";
  
  }
  </code></pre>
  
  <p><strong>view</strong></p>
  
  <pre><code>&lt;form class="form-horizontal" role="form" method="post"
                  action="/contact"&gt;
  
                  &lt;div class="form-group"&gt;
                      &lt;div class="col-md-12"&gt;
                          &lt;label class="sr-only" for="exampleInputName2"&gt;Name 
                          &lt;/label&gt; &lt;input type="text" class="form-control" id="name"
                              name="name" placeholder="Your name" value=""&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;div class="col-md-12"&gt;
                          &lt;label class="sr-only" for="exampleInputName2"&gt;Email
                              Address&lt;/label&gt; &lt;input type="email" class="form-control" id="email"
                              name="email" placeholder="Your email" value=""&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;div class="col-md-12"&gt;
                          &lt;label class="sr-only" for="exampleInputName2"&gt;Phone
                              Number&lt;/label&gt; &lt;input type="number" class="form-control" id="phone"
                              name="phone" placeholder="Phone number" value=""&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;div class="col-md-12"&gt;
                          &lt;label class="sr-only" for="exampleInputName2"&gt;Enquiry&lt;/label&gt;
                          &lt;textarea class="form-control" rows="4" name="message"
                              placeholder="Please enter your enquiry"&gt;&lt;/textarea&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;div class="col-md-2 " style="float: right;"&gt;
                          &lt;input id="submit" name="submit" type="submit" value="Send"
                              class="btn btn-primary"&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="form-group"&gt;
                      &lt;div class="col-sm-10 col-sm-offset-2"&gt;
                          &lt;! Will be used to display an alert to the user&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/form&gt;
  </code></pre>
  
  <p>After submission it shows "Successfully added" message but the fields are blank.</p>