Spring MVC 3: How to provide dynamic content to error page for HTTP 404 errors?
问题 What I want: I want to provide a model to the HTTP 404 error page. Instead of writing a static error Page, which is specified within web.xml, I want to use an exception controller, which handles HTTP 404 errors. What I did: Removed error page tag from web.xml: <error-page> <error-code>404</error-code> <location>/httpError.jsp</location> </error-page> and implemented the following exception handler methods inside my AbstractController class: @ExceptionHandler