Class ErrorPageErrorHandler
java.lang.Object
org.eclipse.jetty.ee10.servlet.ErrorHandler
org.eclipse.jetty.ee10.servlet.ErrorPageErrorHandler
- All Implemented Interfaces:
 ErrorHandler.ErrorPageMapper, Request.Handler, Invocable
An ErrorHandler that maps exceptions and status codes to URIs for dispatch using
the internal ERROR style of dispatch.
- 
Nested Class Summary
Nested classes/interfaces inherited from class ErrorHandler
ErrorHandler.ErrorPageMapperNested classes/interfaces inherited from interface Invocable
Invocable.Callable, Invocable.InvocationType, Invocable.ReadyTask, Invocable.TaskNested classes/interfaces inherited from interface Request.Handler
Request.Handler.AbortException - 
Field Summary
FieldsFields inherited from class ErrorHandler
ERROR_CHARSET, ERROR_CONTEXT, ERROR_PAGEFields inherited from interface Invocable
__nonBlocking, NOOP - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddErrorPage(int from, int to, String uri) Adds ErrorPage mapping for a status code range.voidaddErrorPage(int code, String uri) Adds ErrorPage mapping for a status code.voidaddErrorPage(Class<? extends Throwable> exception, String uri) Adds ErrorPage mapping for an exception class.voidaddErrorPage(String exceptionClassName, String uri) Adds ErrorPage mapping for an exception class.getErrorPage(jakarta.servlet.http.HttpServletRequest request) booleanvoidsetErrorPages(Map<String, String> errorPages) Set a map of Exception class names or error codes as a string to URI string.voidsetUnwrapServletException(boolean unwrapServletException) Methods inherited from class ErrorHandler
badMessageError, errorPageForMethod, generateAcceptableResponse, generateAcceptableResponse, getAcceptableWriter, getCacheControl, getErrorHandler, getShowMessageInTitle, handle, handleErrorPage, isShowMessageInTitle, isShowServlet, isShowStacks, setCacheControl, setShowMessageInTitle, setShowServlet, setShowStacks, write, writeErrorJson, writeErrorPage, writeErrorPageBody, writeErrorPageHead, writeErrorPageMessage, writeErrorPageStacks, writeErrorPlainMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Request.Handler
getInvocationType 
- 
Field Details
- 
GLOBAL_ERROR_PAGE
- See Also:
 
 
 - 
 - 
Constructor Details
- 
ErrorPageErrorHandler
public ErrorPageErrorHandler() 
 - 
 - 
Method Details
- 
isUnwrapServletException
public boolean isUnwrapServletException()- Returns:
 - True if ServletException is unwrapped for 
RequestDispatcher.ERROR_EXCEPTION 
 - 
setUnwrapServletException
public void setUnwrapServletException(boolean unwrapServletException) - Parameters:
 unwrapServletException- True if ServletException should be unwrapped forRequestDispatcher.ERROR_EXCEPTION
 - 
getErrorPage
- Specified by:
 getErrorPagein interfaceErrorHandler.ErrorPageMapper
 - 
getErrorPages
 - 
setErrorPages
 - 
addErrorPage
 - 
addErrorPage
 - 
addErrorPage
Adds ErrorPage mapping for a status code. This method is called as a result of an error-code element in a web.xml file or may be called directly.- Parameters:
 code- The HTTP status code to matchuri- The URI of the error page.
 - 
addErrorPage
Adds ErrorPage mapping for a status code range. This method is not available from web.xml and must be called directly.- Parameters:
 from- The lowest matching status codeto- The highest matching status codeuri- The URI of the error page.
 
 -