From the Javadoc of MultiActionController:
Subclasses can implement custom exception handler methods with names such as:
ModelAndView anyMeaningfulName(HttpServletRequest request, HttpServletResponse response, ExceptionClass exception);
The third parameter can be any subclass or Exception or RuntimeException.
For example, if you wanted to catch a BusinessRuleException, you might add:
Code:
ModelAndView handleBusinessRuleException(HttpServletRequest request, HttpServletResponse response, BusinessRuleException exception) {
return new ModelAndView("/path/to/error.do", "exception", exception);
}
I haven't tested the code to make sure it complies, etc. but that should be pretty darn close.