I'm not sure what "config the Errors and show it to IE" means. Can you clarify?
If you are asking how to view validation errors in a page, look at the documentation for the <spring:errors> JSP tag here: http://static.springsource.org/sprin...glib-errorstag. This tag can be used to show all validation errors for a bean, or to show errors by field.
The tag relies on an Errors object being added to the model. This is usually done automatically. A typical controller handler method might look like this:
Code:
@RequestMapping(value="/test", method=RequestMethod.POST)
public String handleSubmit(@Valid SomeBean bean, BindingResult result, Model model) {
if (result.hasErrors()) {
model.addAttribute(bean);
return "testView";
}
// ... controller processing
return "redirect:/nextPage";
}
In this case, the "result" parameter contains the validation errors (BindingResult extends Errors) and is automatically added to the model by the framework. If the "testView.jsp" file uses the <spring:errors> tag, it will find the the BindingResult bean in the model.