I am trying to make my Controller to redirect to a page with a custom error message:
@RequestMapping(method=RequestMethod.POST) public String process
There's something wrong in your controller method. It would be better way to call getAllErrors() method from result than the getFieldErrors(). Of course if the result is BindingResult type . Like this:
getAllErrors()
getFieldErrors()
BindingResult
model.addAttribute("errors", result.getAllErrors());