Spring custom error message

Posted by Ale on Stack Overflow See other posts from Stack Overflow or by Ale
Published on 2010-05-07T09:31:37Z Indexed on 2010/05/26 7:51 UTC
Read the original article Hit count: 219

Filed under:
|

I want to set a custom error message via @Controller, there is something like Struts saveMessages(...) in spring?

for example:

ActionErrors actionErrors = new ActionErrors();
actionErrors.add("error", new ActionMessage("error.missing.key",     
messageResources.getMessage("label.username"),  
messageResources.getMessage("label.password")));
saveErrors(request, actionErrors);

© Stack Overflow or respective owner

Related posts about java

Related posts about spring-mvc