public class ErrorPageErrorHandler extends ErrorHandler
AbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener| Modifier and Type | Field and Description |
|---|---|
protected javax.servlet.ServletContext |
_servletContext |
static java.lang.String |
ERROR_PAGE |
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING| Constructor and Description |
|---|
ErrorPageErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorPage(java.lang.Class<? extends java.lang.Throwable> exception,
java.lang.String uri)
Add Error Page mapping for an exception class
This method is called as a result of an exception-type element in a web.xml file
or may be called directly
|
void |
addErrorPage(int from,
int to,
java.lang.String uri)
Add Error Page mapping for a status code range.
|
void |
addErrorPage(int code,
java.lang.String uri)
Add Error Page mapping for a status code.
|
void |
addErrorPage(java.lang.String exceptionClassName,
java.lang.String uri)
Add Error Page mapping for an exception class
This method is called as a result of an exception-type element in a web.xml file
or may be called directly
|
protected void |
doStart()
Start the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stop the joined lifecycle beans in the reverse order they were added.
|
java.util.Map<java.lang.String,java.lang.String> |
getErrorPages() |
void |
handle(java.lang.String target,
Request baseRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle a request.
|
void |
setErrorPages(java.util.Map<java.lang.String,java.lang.String> errorPages) |
getCacheControl, getShowMessageInTitle, handleErrorPage, isShowStacks, setCacheControl, setShowMessageInTitle, setShowStacks, write, writeErrorPage, writeErrorPageBody, writeErrorPageHead, writeErrorPageMessage, writeErrorPageStacksdestroy, dumpThis, getServer, setServeraddBean, addBean, contains, dump, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanageaddLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic static final java.lang.String ERROR_PAGE
protected javax.servlet.ServletContext _servletContext
public void handle(java.lang.String target,
Request baseRequest,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
Handlerhandle in interface Handlerhandle in class ErrorHandlertarget - The target of the request - either a URI or a name.baseRequest - The original unwrapped request object.request - The request either as the Request
object or a wrapper of that request. The AbstractHttpConnection.getCurrentConnection()
method can be used access the Request object if required.response - The response as the Response
object or a wrapper of that request. The AbstractHttpConnection.getCurrentConnection()
method can be used access the Response object if required.java.io.IOExceptionErrorHandler.handle(String, Request, HttpServletRequest, HttpServletResponse)public java.util.Map<java.lang.String,java.lang.String> getErrorPages()
public void setErrorPages(java.util.Map<java.lang.String,java.lang.String> errorPages)
errorPages - The errorPages to set. A map of Exception class name or error code as a string to URI stringpublic void addErrorPage(java.lang.Class<? extends java.lang.Throwable> exception,
java.lang.String uri)
exception - The exceptionuri - The URI of the error page.public void addErrorPage(java.lang.String exceptionClassName,
java.lang.String uri)
exceptionClassName - The exceptionuri - The URI of the error page.public void addErrorPage(int code,
java.lang.String uri)
code - The HTTP status code to matchuri - The URI of the error page.public void addErrorPage(int from,
int to,
java.lang.String uri)
from - The lowest matching status codeto - The highest matching status codeuri - The URI of the error page.protected void doStart()
throws java.lang.Exception
AggregateLifeCycledoStart in class AbstractHandlerjava.lang.ExceptionAbstractLifeCycle.doStart()protected void doStop()
throws java.lang.Exception
AggregateLifeCycledoStop in class AbstractHandlerjava.lang.ExceptionAbstractLifeCycle.doStart()Copyright © 2013 FuseSource, Corp.. All Rights Reserved.