public class ErrorPageErrorHandler extends ErrorHandler implements ErrorHandler.ErrorPageMapper
ErrorHandler.ErrorPageMapperAbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.ListenerContainer.InheritedListener, Container.Listener| Modifier and Type | Field and Description |
|---|---|
protected ServletContext |
_servletContext |
static String |
GLOBAL_ERROR_PAGE |
ERROR_PAGE| Constructor and Description |
|---|
ErrorPageErrorHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addErrorPage(Class<? extends Throwable> exception,
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,
String uri)
Add Error Page mapping for a status code range.
|
void |
addErrorPage(int code,
String uri)
Add Error Page mapping for a status code.
|
void |
addErrorPage(String exceptionClassName,
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()
Starts the managed lifecycle beans in the order they were added.
|
String |
getErrorPage(HttpServletRequest request) |
Map<String,String> |
getErrorPages() |
void |
setErrorPages(Map<String,String> errorPages) |
badMessageError, getCacheControl, getErrorHandler, getShowMessageInTitle, handle, handleErrorPage, isShowStacks, setCacheControl, setShowMessageInTitle, setShowStacks, write, writeErrorPage, writeErrorPageBody, writeErrorPageHead, writeErrorPageMessage, writeErrorPageStacksdestroy, doStop, dumpThis, getServer, setServeraddBean, addBean, addBean, addEventListener, addManaged, contains, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, 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 String GLOBAL_ERROR_PAGE
protected ServletContext _servletContext
public String getErrorPage(HttpServletRequest request)
getErrorPage in interface ErrorHandler.ErrorPageMapperpublic void setErrorPages(Map<String,String> errorPages)
errorPages - The errorPages to set. A map of Exception class name or error code as a string to URI stringpublic void addErrorPage(Class<? extends Throwable> exception, String uri)
exception - The exceptionuri - The URI of the error page.public void addErrorPage(String exceptionClassName, String uri)
exceptionClassName - The exceptionuri - The URI of the error page.public void addErrorPage(int code,
String uri)
code - The HTTP status code to matchuri - The URI of the error page.public void addErrorPage(int from,
int to,
String uri)
from - The lowest matching status codeto - The highest matching status codeuri - The URI of the error page.protected void doStart()
throws Exception
ContainerLifeCycledoStart in class AbstractHandlerExceptionCopyright © 1995-2015 Webtide. All Rights Reserved.