一种选择是通过调度程序servlet映射所有错误页面。
创建一个新的HTTP错误控制器:
@Controllerpublic class HTTPErrorController { @RequestMapping(value="/errors/404.html") public String handle404() { return "errorPageTemplate"; } @RequestMapping(value="/errors/403.html") ...}映射web.xml中的错误页面
<error-page> <error-pre>404</error-pre> <location>/errors/404.html</location>



