org.eclipse.jetty.osgi.httpservice
Class HttpServiceErrorPageErrorHandler
java.lang.Object
org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AggregateLifeCycle
org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.ErrorHandler
org.eclipse.jetty.servlet.ErrorPageErrorHandler
org.eclipse.jetty.osgi.httpservice.HttpServiceErrorPageErrorHandler
- All Implemented Interfaces:
- Handler, Destroyable, Dumpable, LifeCycle
public class HttpServiceErrorPageErrorHandler
- extends ErrorPageErrorHandler
Extended error page handler.
Makes it easy to plug a servlet to handle errors thrown by the HttpService or
to use Jetty's ErrorPageErrorHandler API to plug custom error pages.
Methods inherited from class org.eclipse.jetty.server.handler.ErrorHandler |
getCacheControl, handleErrorPage, isShowStacks, setCacheControl, setShowStacks, write, writeErrorPage, writeErrorPageBody, writeErrorPageHead, writeErrorPageMessage, writeErrorPageStacks |
Methods inherited from class org.eclipse.jetty.util.component.AggregateLifeCycle |
addBean, addBean, contains, dump, dump, dump, dump, dump, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage |
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle |
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop, toString |
HttpServiceErrorPageErrorHandler
public HttpServiceErrorPageErrorHandler()
getInstance
public static HttpServiceErrorPageErrorHandler getInstance()
handle
public void handle(String target,
Request baseRequest,
HttpServletRequest request,
HttpServletResponse response)
throws IOException
- Description copied from interface:
Handler
- Handle a request.
- Specified by:
handle
in interface Handler
- Overrides:
handle
in class ErrorPageErrorHandler
- Parameters:
target
- 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.
- Throws:
IOException
- See Also:
ErrorHandler.handle(String, Request, HttpServletRequest, HttpServletResponse)
doStop
protected void doStop()
throws Exception
- Description copied from class:
AggregateLifeCycle
- Stop the joined lifecycle beans in the reverse order they were added.
- Overrides:
doStop
in class ErrorPageErrorHandler
- Throws:
Exception
- See Also:
AbstractLifeCycle.doStart()
Copyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.