org.apache.tomcat.modules.config
Class WorkDirSetup
java.lang.Object
|
+--org.apache.tomcat.core.BaseInterceptor
|
+--org.apache.tomcat.modules.config.WorkDirSetup
- public class WorkDirSetup
- extends BaseInterceptor
Handles work dir setup/removal.
- Author:
- cmanolache@yahoo.com
Field Summary |
static java.lang.String |
ATTRIB_WORKDIR
Workdir - a place where the servlets are allowed to write |
static java.lang.String |
DEFAULT_WORK_DIR
Default work dir, relative to home |
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addHandler, addInterceptor, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextInit, contextMap, contextState, engineShutdown, engineStart, engineState, engineStop, findSession, getContext, getContextManager, getDebug, 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
ATTRIB_WORKDIR
public static final java.lang.String ATTRIB_WORKDIR
- Workdir - a place where the servlets are allowed to write
WorkDirSetup
public WorkDirSetup()
setCleanWorkDir
public void setCleanWorkDir(boolean b)
- Auto-remove the work dir when tomcat is (grecefully) stoped
and when tomcat starts.
IMHO this shouldn't be used - if true, we'll loose
all jsp compiled files. The workdir is the only directory
where the servlet is allowed to write anyway ( if policy
is used ).
setWorkDirBase
public void setWorkDirBase(java.lang.String s)
- Allow the user to customize the base directory for
workdirs ( /var/tomcat/workdir for example )
setUseWebInf
public void setUseWebInf(boolean useWebInf)
setOldStyle
public void setOldStyle(boolean b)
engineInit
public void engineInit(ContextManager cm)
throws TomcatException
- 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.
addContext
public void addContext(ContextManager cm,
Context ctx)
- Description copied from class:
BaseInterceptor
- Called when a context is added to a CM. The context is probably not
initialized yet, only path, docRoot, host, and properties set before
adding the context ( in server.xml for example ) are available.
At this stage mappers can start creating structures for the
context ( the actual loading of the context may be delayed in
future versions of tomcat until the first access ).
DefaultCMSetter will also adjust the logger and paths
based on context manager properties.
Any activity that depends on web.xml must be done at
init time.
- Overrides:
addContext
in class BaseInterceptor
contextShutdown
public void contextShutdown(Context ctx)
- Description copied from class:
BaseInterceptor
- Called when a context is stoped, before removeContext.
You must free all resources associated with this context.
- Overrides:
contextShutdown
in class BaseInterceptor
getInfo
public final java.lang.Object getInfo(Context ctx,
Request req,
int info,
java.lang.String k)
- Description copied from class:
BaseInterceptor
- Hook for lazy evaluation of request info.
This provides and uniform mechanism to allow modules to evaluate
certain expensive request attributes/parameters when they are
needed ( if ever ), and allows specialized modules and
better integration with the web server/server modules.
This replaces a number of hard-coded constructs and should
clean up the core for un-needed dependencies, as well as provide
flexibility in key areas as encoding, etc.
- Overrides:
getInfo
in class BaseInterceptor
Copyright © 2001 Apache Software Foundation. All Rights Reserved.