|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.core.BaseInterceptor
org.apache.tomcat.modules.config.BaseJkConfig
Base class for automatic jk based configurations based on the Tomcat server.xml settings and the war contexts initialized during startup.
This config interceptor is enabled by inserting a Config element in the <ContextManager> tag body inside the server.xml file like so:
< ContextManager ... > ... <???Config options /> ... < /ContextManager >where options can include any of the following attributes:
Field Summary | |
protected java.io.File |
configHome
|
protected boolean |
forwardAll
|
protected java.lang.String |
jkDebug
|
protected java.io.File |
jkLog
|
protected java.lang.String |
jkWorker
|
protected boolean |
noRoot
|
protected boolean |
regenerate
|
protected java.lang.String |
tomcatHome
|
protected java.io.File |
workersConfig
|
Fields inherited from class org.apache.tomcat.core.BaseInterceptor |
cm, ct, ctx, debug, DECLINED, loghelper, OK |
Constructor Summary | |
BaseJkConfig()
|
Method Summary | |
protected boolean |
addExtensionMapping(java.lang.String ctxPath,
java.lang.String ext,
java.io.PrintWriter pw)
Add an extension mapping. |
void |
addInterceptor(ContextManager cm,
Context ctx,
BaseInterceptor bi)
Hook called when a new interceptor is added. |
protected boolean |
addMapping(Context ctx,
Container ct,
java.io.PrintWriter pw)
|
protected boolean |
addMapping(java.lang.String fullPath,
java.io.PrintWriter pw)
Add a fulling specified mapping. |
void |
contextInit(Context ctx)
Notify when a context is initialized. |
void |
engineState(ContextManager cm,
int state)
Generate the configuration - only when the server is completely initialized ( before starting ) |
void |
execute(ContextManager cm)
Generate configuration files. |
protected java.lang.String |
getAbsoluteDocBase(Context context)
|
protected void |
initProperties(ContextManager cm)
Initialize defaults for properties that are not set explicitely |
protected void |
initWorker(ContextManager cm)
|
void |
setConfigHome(java.lang.String dir)
set a path to the parent directory of the conf folder. |
void |
setForwardAll(boolean b)
If false, we'll try to generate a config that will let apache serve static files. |
void |
setJkDebug(java.lang.String level)
Set the verbosity level ( use debug, error, etc. |
void |
setJkLog(java.lang.String path)
set the path to the log file |
void |
setJkWorker(java.lang.String worker)
set the Ajp protocal |
void |
setNoRoot(boolean b)
Special option - do not generate mappings for the ROOT context. |
void |
setWorkersConfig(java.lang.String path)
set a path to the workers.properties file. |
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addContext, addHandler, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextMap, contextShutdown, contextState, copyContext, engineInit, engineShutdown, engineStart, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, handleError, log, log, log, log, postInitCheck, postReadRequest, postRequest, postService, postServletDestroy, postServletInit, preInitCheck, 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 |
Field Detail |
protected java.io.File configHome
protected java.io.File workersConfig
protected java.io.File jkLog
protected java.lang.String jkDebug
protected java.lang.String jkWorker
protected boolean noRoot
protected boolean forwardAll
protected java.lang.String tomcatHome
protected boolean regenerate
Constructor Detail |
public BaseJkConfig()
Method Detail |
public void addInterceptor(ContextManager cm, Context ctx, BaseInterceptor bi) throws TomcatException
BaseInterceptor
addInterceptor
in class BaseInterceptor
cm
- the serverctx
- not null if this is a local interceptorbi
- the new added interceptor
TomcatException
- The module will not be added if any
module throws an exception.public void engineState(ContextManager cm, int state) throws TomcatException
engineState
in class BaseInterceptor
TomcatException
public void contextInit(Context ctx) throws TomcatException
BaseInterceptor
contextInit
in class BaseInterceptor
TomcatException
public void execute(ContextManager cm) throws TomcatException
TomcatException
public void setForwardAll(boolean b)
public void setNoRoot(boolean b)
public void setConfigHome(java.lang.String dir)
However, if the path is set to an absolute path, this attribute is ignored.
If not set, execute() will set this to TOMCAT_HOME.
public void setWorkersConfig(java.lang.String path)
public void setJkLog(java.lang.String path)
public void setJkDebug(java.lang.String level)
public void setJkWorker(java.lang.String worker)
protected void initProperties(ContextManager cm)
protected void initWorker(ContextManager cm)
protected boolean addMapping(Context ctx, Container ct, java.io.PrintWriter pw)
protected boolean addExtensionMapping(java.lang.String ctxPath, java.lang.String ext, java.io.PrintWriter pw)
protected boolean addMapping(java.lang.String fullPath, java.io.PrintWriter pw)
protected java.lang.String getAbsoluteDocBase(Context context)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |