title: Error message is not displayed in the Spring MVC validator
body: <p>My code is as below, when I enter input field as wrong value then validator invalidates the input bean values, but in view error message is not displayed.</p>
  
  <p><strong>COntroller</strong></p>
  
  <pre><code>@RequestMapping(value = "/AddInventory.html", method = RequestMethod.POST)
  public ModelAndView inventorymgmt(@Valid Itemtype itemTypeForm, BindingResult result, Map&lt;String, Object&gt; model) throws Exception {
      logger.log(Level.OFF, "Add Inventory called with inventory details ####### ." + itemTypeForm);
  
      if (result.hasErrors()) {
          logger.log(Level.OFF, "Error occured while inserting the reconrd for the item type." + result.getAllErrors());
          ModelAndView modelAndView = new ModelAndView("add-item_category");
          modelAndView.addAllObjects(model);
          return modelAndView;
      }
      else {
          logger.log(Level.OFF, "Insert result ####### ." + itemTypeDAO.insert(itemTypeForm));
          return new ModelAndView("redirect://item_category.html");
      }
  }
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>&lt;form:form action="AddInventory.html" method="POST" commandName="itemTypeForm"&gt;
      &lt;form:errors path="*" cssClass="errorblock" element="div" /&gt;
      &lt;div class="col-md-9"&gt;
          &lt;div class="catagory-main-box top-radius"&gt;
              &lt;div class="cat-box-title cat-title-font top-radius"&gt;Item Category &lt;/div&gt;
  
              &lt;div class="row tb-margin"&gt;
                  &lt;div class="col-sm-2"&gt;&lt;/div&gt;
                  &lt;div class="col-sm-8 visible-lg visible-md visible-sm"&gt;
  
                      &lt;div class="form-group"&gt;
                          &lt;label class="col-sm-4 col-xs-12 control-label search-text"&gt;Name:&lt;/label&gt;
                          &lt;div class="col-sm-8 col-xs-12"&gt;
                              &lt;form:input  type="text" class="form-control" path="name" placeholder="Name"/&gt;
                              &lt;form:errors path="name" cssClass="error" /&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;
                          &lt;label class="col-sm-4 col-xs-12 control-label search-text"&gt; Description:&lt;/label&gt;
                          &lt;div class="col-sm-8 col-xs-12"&gt;
                              &lt;form:input  type="text" class="form-control" path="description" placeholder="Description"/&gt;
                              &lt;form:errors path="description" cssClass="error" /&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;div class="col-sm-8 visible-xs"&gt;
                      &lt;div class="form-group"&gt;
                          &lt;div class="col-sm-8 col-xs-12"&gt;
                              &lt;form:input  type="text" class="form-control" path="name" placeholder="Name"/&gt;
                              &lt;form:errors path="name" cssClass="error" /&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                      &lt;div class="form-group"&gt;
                          &lt;div class="col-sm-8 col-xs-12"&gt;
                              &lt;form:input  type="text" class="form-control" path="description" placeholder="Description"/&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  
                  &lt;div class="col-sm-2"&gt;&lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class="row text-pad-top visible-lg visible-md visible-sm"&gt;
                  &lt;div class="div-center"&gt;
                      &lt;button type="button" class="btn btn-orange" onclick="submitDetailsForm();"&gt;Save&lt;/button&gt;
                      &lt;button type="button" class="btn btn-orange" onclick="javascript:history.back();"&gt;Cancel&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
              &lt;div class="row text-pad-top visible-xs "&gt;
                  &lt;div class="div-center-xs"&gt;
                      &lt;button type="button" class="btn btn-orange" onclick="submitDetailsForm();"&gt;Save&lt;/button&gt;
                      &lt;button type="button" class="btn btn-orange" onclick="javascript:history.back();"&gt;Cancel&lt;/button&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form:form&gt;
  </code></pre>
  
  <p><strong>Bean</strong></p>
  
  <pre><code>package com.tss.ocean.pojo;
  // Generated 4 Aug, 2014 6:30:10 PM by Hibernate Tools 3.2.1.GA
  
  import javax.validation.constraints.Size;
  import org.hibernate.validator.constraints.NotEmpty;
  
  /**
   * Itemtype generated by hbm2java
   *
   * @author Bhavik Ambani
   */
  public class Itemtype implements java.io.Serializable {
  
      private Integer id;
  
      @NotEmpty(message = "Please enter item name.")
      @Size(min = 10, max = 45, message = "Item name must between 1 and 45 characters")
      private String name;
  
      @Size(min = 0, max = 45, message = "Item description must between 0 and 65535 characters")
      private String description;
  
      public Itemtype() {
      }
  
      public Itemtype(String name, String description) {
          this.name = name;
          this.description = description;
      }
  
      public Integer getId() {
          return this.id;
      }
  
      public void setId(Integer id) {
          this.id = id;
      }
  
      public String getName() {
          return this.name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public String getDescription() {
          return this.description;
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  
      @Override
      public String toString() {
          return "Itemtype{" + "id=" + id + ", name=" + name + ", description=" + description + '}';
      }
  }
  </code></pre>