org.apache.tomcat.modules.generators
Class ErrorHandler
java.lang.Object
|
+--org.apache.tomcat.core.BaseInterceptor
|
+--org.apache.tomcat.modules.generators.ErrorHandler
- public final class ErrorHandler
- extends BaseInterceptor
Handle errors - this is the default handler, you can replace it
with customized versions
- Author:
- Costin Manolache
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addContext, addHandler, addInterceptor, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextMap, contextShutdown, contextState, engineShutdown, engineState, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, log, log, log, log, postReadRequest, postRequest, postService, postServletDestroy, postServletInit, preService, preServletDestroy, preServletInit, registerHooks, reload, removeContainer, removeContext, removeHandler, removeInterceptor, requestMap, sessionState, setContext, setContextManager, setDebug, setInfo, setNote, setNote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ErrorHandler
public ErrorHandler()
setShowDebugInfo
public void setShowDebugInfo(boolean b)
setDefaultRedirectStatus
public void setDefaultRedirectStatus(java.lang.String s)
engineInit
public void engineInit(ContextManager cm)
- Description copied from class:
BaseInterceptor
- Initialize the module.
- Overrides:
engineInit
in class BaseInterceptor
- Following copied from class:
org.apache.tomcat.core.BaseInterceptor
- Throws:
TomcatException
- The module will not be added if any
exception is thrown by engineInit.
engineStart
public void engineStart(ContextManager cm)
throws TomcatException
- Check that we are in a stable state.
- Overrides:
engineStart
in class BaseInterceptor
contextInit
public void contextInit(Context ctx)
throws TomcatException
- Add default error handlers
- Overrides:
contextInit
in class BaseInterceptor
- Following copied from class:
org.apache.tomcat.core.BaseInterceptor
- Throws:
If
- the interceptor throws exception the context will
not be initialized ( state==NEW or ADDED or DISABLED ).
handleError
public int handleError(Request req,
Response res,
java.lang.Throwable t)
- Description copied from class:
BaseInterceptor
- This callback is called whenever an exception happen.
If t is null assume this is a "status" report ( 500, 404, etc).
During this hook it is possible to create a sub-request
and call the handler, and it is possible that the sub-request
will also generate an exception. The handler must insure
no loops will happen - but it's free to choose whatever method
it wants.
It's also the handler responsiblity to insure correct
servlet API semantics - if the spec becomes incopmatible
with previous versions ( or multiple interpretations are
possible) that can be made a context-specific handler.
- Overrides:
handleError
in class BaseInterceptor
getHandlerForPath
public final Handler getHandlerForPath(ContextManager cm,
Context ctx,
java.lang.String path)
Copyright © 2001 Apache Software Foundation. All Rights Reserved.