类 ErrorPageFilter

  • 所有已实现的接口:
    javax.servlet.Filter, ErrorPageRegistry

    @Order(-2147483647)
    public class ErrorPageFilter
    extends Object
    implements javax.servlet.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).
    从以下版本开始:
    2.0.0
    • 方法详细资料

      • init

        public void init​(javax.servlet.FilterConfig filterConfig)
                  throws javax.servlet.ServletException
        指定者:
        init 在接口中 javax.servlet.Filter
        抛出:
        javax.servlet.ServletException
      • doFilter

        public void doFilter​(javax.servlet.ServletRequest request,
                             javax.servlet.ServletResponse response,
                             javax.servlet.FilterChain chain)
                      throws IOException,
                             javax.servlet.ServletException
        指定者:
        doFilter 在接口中 javax.servlet.Filter
        抛出:
        IOException
        javax.servlet.ServletException
      • getDescription

        protected String getDescription​(javax.servlet.http.HttpServletRequest request)
        Return the description for the given request. By default this method will return a description based on the request servletPath and pathInfo.
        参数:
        request - the source request
        返回:
        the description
        从以下版本开始:
        1.5.0
      • destroy

        public void destroy()
        指定者:
        destroy 在接口中 javax.servlet.Filter