title: Spring MVC validation doesn't show error message
body: <p>I'm working on web application which should validate date before save it in DB. So i'm trying to use for that spring mvc validator. But I have a problem that form doesn't show error message.</p>
  
  <p>My user.jsp:</p>
  
  <pre><code>&lt;form:form class="editUser" method="POST" commandName="user"&gt;
      &lt;form:input path="email"/&gt;
      &lt;form:errors path="email"/&gt;
      other fields
  &lt;/form&gt;
  </code></pre>
  
  <p>My controller:</p>
  
  <pre><code>@RequestMapping(value = "/user/save", method = RequestMethod.POST)
  public String save(@Valid @ModelAttribute("user") final User user,
          BindingResult result) throws Exception
  {
      if (result.hasErrors()) {
          return "redirect:/addUser";
      } else {
          handler.saveUser(user);
          return "redirect:/userList";
     }
  }
  </code></pre>
  
  <p>My User class:</p>
  
  <pre><code>public class User {
      @NotEmpty(message = "Please enter your email addresss.")
      private String email;
  
      other fields
  }
  </code></pre>
  
  <p>As far as I see in debug mode result contains error if I submit empty email, but it error doesn't show on page. Could some one help me?</p>
  
  <p><strong>UPDATE:</strong>
  I have tried to use <code>RedirectAttributes</code>, but it still doesn't work.</p>
  
  <p>My controller:</p>
  
  <pre><code>public String save(@Valid @ModelAttribute("user") final User user,
          BindingResult result) throws Exception
  {
      if (result.hasErrors()) {
          redirectAttributes.addFlashAttribute("org.springframework.validation.BindingResult.user", result);
          redirectAttributes.addFlashAttribute("errors", result.getAllErrors());
          redirectAttributes.addFlashAttribute("user", user);
          return "redirect:/addUser";
      } else {
          handler.saveUser(user);
          return "redirect:/userList";
     }
  }
  </code></pre>