org.springframework.boot.web.servlet.support

Class ErrorPageFilter

  • All Implemented Interfaces:
    Filter, ErrorPageRegistry


    @Order(value=-2147483647)
    public class ErrorPageFilter
    extends Object
    implements Filter, ErrorPageRegistry
    A Servlet Filter that provides an ErrorPageRegistry for non-embedded applications (i.e. deployed WAR files). It registers error pages and handles application errors by filtering requests and forwarding to the error pages instead of letting the server handle them. Error pages are a feature of the servlet spec but there is no Java API for registering them in the spec. This filter works around that by accepting error page registrations from Spring Boot's ErrorPageRegistrar (any beans of that type in the context will be applied to this server).
    Since:
    2.0.0
    Author:
    Dave Syer, Phillip Webb, Andy Wilkinson