ErrorPageFilter

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).

Author

Dave Syer

Phillip Webb

Andy Wilkinson

Since

2.0.0

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
val ERROR_REQUEST_URI: String = "jakarta.servlet.error.request_uri"
The name of the servlet attribute containing request URI.
Link copied to clipboard
val HIGHEST_PRECEDENCE: Int = -2147483648
Link copied to clipboard
val LOWEST_PRECEDENCE: Int = 2147483647

Functions

Link copied to clipboard
open fun addErrorPages(errorPages: Array<ErrorPage>)
Adds error pages that will be used when handling exceptions.
Link copied to clipboard
open fun destroy()
Link copied to clipboard
open fun doFilter(request: ServletRequest, response: ServletResponse, chain: FilterChain)
Link copied to clipboard
open fun getOrder(): Int
Link copied to clipboard
open fun init(filterConfig: FilterConfig)