title: spring equivalent of ActionErrors
body: <p>I am working on validation in Spring framework. I want to know the Spring equivalent of ActionErrors. I have gone though many materials which tells only about the Validator framework and the validate method which tells only about the form validation part. But my problem is, I have an exception caught, I have messages. I want to propagate these to jsp. Typically my Struts code peice is as below: </p>
  
  <pre><code>ActionErrors errors = new ActionErrors();
  errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("errors.msg",  messageResources.getMessage("label.username"), messageResources.getMessage("label.password")));
  request.setAttribute(Globals.ERROR_KEY, errors);
  </code></pre>
  
  <p>In my jsp, I have  tag which takes care of displaying the error messages </p>
  
  <p>How do I convert that to Spring?</p>
  
  <p>I have already went through <a href="https://stackoverflow.com/questions/2787517/spring-custom-error-message">this</a> post and have referred <a href="http://docs.spring.io/spring/docs/3.0.x/spring-framework-reference/html/validation.html#validator" rel="nofollow noreferrer">this</a> page as mentioned there. But all the links returns only Validator framework and the client side validaions using the validate() method. But what I am looking is how to propagate the error messages from my controller class to jsp view.</p>