One way to have Exceptions directed to a specific page are xml and annotations. Personally, I like the annotation. In Spring MVC you can annotate a Controller method with
@ExceptionHandler({ExceptionClassesAsArrayHere.class})
public String someMethod() {
I can do anything here
return "viewNameForCustomExceptionPage";
}
Sorry I didn't indent it, but is it such small amount of code.