@Controller
public class HTTPErrorController {
@RequestMapping(value="/errors/404.html")
public String handle404() {
return "errorPageTemplate";
}
@RequestMapping(value="/errors/403.html")
...
}
<error-page>
<error-code>404</error-code>
<location>/errors/404.html</location>