|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.core.Handler
org.apache.tomcat.facade.ServletHandler
Handler for servlets. It'll implement all servlet-specific requirements ( init, Unavailable exception, etc). It is also used for Jsps ( since a Jsp is a servlet ), but requires the Jsp interceptor to make sure that indeed a Jsp is a servlet ( and set the class name ). The old Jsp hack is no longer supported ( i.e. declaring a servlet with the name jsp, mapping *.jsp -> jsp will work as required by the servlet spec - no special hook is provided for initialization ). Note that JspServlet doesn't work without special cases in ServletWrapper.
Field Summary | |
protected Context |
context
|
protected javax.servlet.Servlet |
servlet
|
protected java.lang.Class |
servletClass
|
static int |
STATE_DELAYED_INIT
If init() fails or preInit() detects the handler is still unavailable. |
static int |
STATE_READY
The handler has been succesfully initialized and is ready to serve requests. |
Fields inherited from class org.apache.tomcat.core.Handler |
contextM, debug, errorException, logger, module, name, next, prev, state, STATE_ADDED, STATE_DISABLED, STATE_NEW |
Constructor Summary | |
ServletHandler()
|
Method Summary | |
java.lang.String[] |
_getDepends()
The handler may return a set of classes it depends on |
void |
destroy()
Destroy a handler, and notify all the interested interceptors |
protected void |
doDestroy()
|
protected void |
doInit()
|
protected void |
doService(Request req,
Response res)
|
protected void |
doSTMService(javax.servlet.http.HttpServletRequest reqF,
javax.servlet.http.HttpServletResponse resF)
|
Context |
getContext()
Return the context associated with the handler |
javax.servlet.Servlet |
getServlet()
|
java.lang.String |
getServletClassName()
|
ServletInfo |
getServletInfo()
|
protected void |
handleInitError(Request req,
Response res,
java.lang.Throwable t)
|
protected void |
handleServiceError(Request req,
Response res,
java.lang.Throwable t)
|
void |
init()
Call the init method, and notify all interested listeners. |
protected void |
preInit()
|
void |
reload()
Reload notification. |
void |
service(Request req,
Response res)
Call the service method, and notify all listeners |
void |
setContext(Context context)
|
void |
setServletClassName(java.lang.String servletClassName)
|
void |
setServletInfo(ServletInfo sw)
|
void |
setSTMPoolSize(int size)
|
void |
setUseSTMPool(boolean useP)
|
java.lang.String |
toString()
|
Methods inherited from class org.apache.tomcat.core.Handler |
getErrorException, getModule, getName, getNext, getNote, getNote, getPrevious, getState, invoke, log, log, setContextManager, setDebug, setErrorException, setModule, setName, setNext, setNote, setNote, setPrevious, setState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int STATE_DELAYED_INIT
public static final int STATE_READY
protected java.lang.Class servletClass
protected javax.servlet.Servlet servlet
protected Context context
Constructor Detail |
public ServletHandler()
Method Detail |
public java.lang.String toString()
toString
in class Handler
public void setServletInfo(ServletInfo sw)
public void setUseSTMPool(boolean useP)
public void setSTMPoolSize(int size)
public ServletInfo getServletInfo()
public void setContext(Context context)
public Context getContext()
public void setServletClassName(java.lang.String servletClassName)
public java.lang.String getServletClassName()
public final void destroy()
destroy
in class Handler
public final void init()
init
in class Handler
public void reload()
Handler
reload
in class Handler
public javax.servlet.Servlet getServlet() throws java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
protected void doDestroy() throws TomcatException
TomcatException
protected void preInit() throws java.lang.Exception
java.lang.Exception
protected void doInit() throws java.lang.Exception
java.lang.Exception
public void service(Request req, Response res) throws java.lang.Exception
Handler
service
in class Handler
java.lang.Exception
- if an error happens during handling of
the request. Common errors are:
protected void doSTMService(javax.servlet.http.HttpServletRequest reqF, javax.servlet.http.HttpServletResponse resF) throws java.lang.Exception
java.lang.Exception
protected void doService(Request req, Response res) throws java.lang.Exception
doService
in class Handler
java.lang.Exception
protected void handleInitError(Request req, Response res, java.lang.Throwable t)
protected void handleServiceError(Request req, Response res, java.lang.Throwable t) throws java.lang.Exception
handleServiceError
in class Handler
java.lang.Exception
public java.lang.String[] _getDepends()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |