title: sending success or error message to view with spring 3 annotations
body: <p>I've a jsp page which is like this:</p>
  
  <pre><code>&lt;form:form action="userRegistration" name="userRegistrationForm" commandName="userRegistration"&gt;
  
  &lt;form:input path="userName"/&gt;
  &lt;form:input path="houseNo"/&gt;
  
  &lt;/form:form&gt;
  </code></pre>
  
  <p>and all the required fields.</p>
  
  <p>In controller I use like this:</p>
  
  <pre><code>@RequestMapping(method=RequestMethod.GET)
  public String registration(ModelMap model,HttpSession session) {
      UserRegistration userRegistration = service.createUserRegistration();
      model.addAttribute("userRegistration",userRegistration);
      return "registrationview";
  }
  
  
  @RequestMapping(method=RequestMethod.POST)
  public String getRegistration(UserRegistration userRegistration, HttpSession session, ModelMap model) {
      boolean result = validateAndSaveData(userRegistration);
      if (result){
  
      }
  }
  </code></pre>
  
  <p>when the user submits the form, it comes to the post and then validates the input and saves it.
  How can I send a succes message and error message to the view. Is there any changes required in the existing implementation ?</p>