org.apache.tomcat.modules.config
Class PathSetter
java.lang.Object
|
+--org.apache.tomcat.core.BaseInterceptor
|
+--org.apache.tomcat.modules.config.PathSetter
- public final class PathSetter
- extends BaseInterceptor
Set ( and guess ) the paths to absolute ( and canonical ) directories.
This module must be added first ( before even ServerXmlReader ).
If tomcat is embeded _and_ you are sure that all paths you set
are OK - you may not need this ( but better to be safe and add it ).
You don't have to insert this in server.xml - it's better to add it
manually, to be sure it is first.
Will set: tomcat.home, CM.home, CM.installDir, CM.workDir, Ctx.absolutePath
( based on DefaultCMSetter )
- Author:
- Costin Manolache
Field Summary |
static java.lang.String |
DEFAULT_WORK_DIR
Default work dir, relative to home |
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addHandler, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextInit, contextMap, contextShutdown, contextState, engineShutdown, engineStart, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, handleError, 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 |
DEFAULT_WORK_DIR
public static final java.lang.String DEFAULT_WORK_DIR
- Default work dir, relative to home
PathSetter
public PathSetter()
addInterceptor
public void addInterceptor(ContextManager cm,
Context ctx,
BaseInterceptor module)
throws TomcatException
- Adjust context manager paths. This happens before anything
else.
- Overrides:
addInterceptor
in class BaseInterceptor
- Following copied from class:
org.apache.tomcat.core.BaseInterceptor
- Parameters:
cm
- the serverctx
- not null if this is a local interceptori
- the new added interceptor- Throws:
TomcatException
- The module will not be added if any
module throws an exception.
engineInit
public void engineInit(ContextManager cm)
throws TomcatException
- After server.xml is read - make sure the workDir is absolute,
and all global loggers are set to absolute paths and open.
- 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.
engineState
public void engineState(ContextManager cm,
int state)
throws TomcatException
- Description copied from class:
BaseInterceptor
- Notifies the module that the server changed it's state.
XXX this seems more flexible than init/start/stop/shutdown.
- Overrides:
engineState
in class BaseInterceptor
addContext
public void addContext(ContextManager cm,
Context ctx)
throws TomcatException
- Adjust paths for a context - make the base and all loggers
point to canonical paths.
- Overrides:
addContext
in class BaseInterceptor
Copyright © 2001 Apache Software Foundation. All Rights Reserved.