org.apache.tomcat.modules.config
Class AutoWebApp
java.lang.Object
|
+--org.apache.tomcat.core.BaseInterceptor
|
+--org.apache.tomcat.modules.config.AutoWebApp
- public class AutoWebApp
- extends BaseInterceptor
Automatically add all the web applications from a directory.
You can use multiple AutoWebApp modules with different locations.
This module will not "deploy" wars or do any other configuration. It'll
just use all the sub-directories as web application bases, and use
a simple escaping scheme.
Based on the original AutoSetup.
- Author:
- cmanolache@yahoo.com
Method Summary |
void |
engineInit(ContextManager cm)
Initialize the module. |
void |
setDir(java.lang.String d)
Use this directory for auto configuration. |
void |
setFlat(boolean b)
Not implemented - default is true. |
void |
setHost(java.lang.String h)
All applications in the directory will be added to a
single virtual host. |
void |
setHostChar(java.lang.String c)
|
void |
setHostDotChar(java.lang.String c)
|
void |
setIngoreDot(boolean b)
Ignore directories starting with a "." |
void |
setPathSlashChar(java.lang.String c)
|
void |
setPrefix(java.lang.String s)
Add a prefix to all deployed context paths |
void |
setProfile(java.lang.String s)
Set the "profile" attribute on each context. |
void |
setReloadable(boolean b)
|
void |
setTrusted(boolean b)
Set the trusted attribute to all apps. |
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addContext, addHandler, addInterceptor, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextInit, contextMap, contextShutdown, contextState, engineShutdown, engineStart, engineState, 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 |
AutoWebApp
public AutoWebApp()
setDir
public void setDir(java.lang.String d)
- Use this directory for auto configuration. Default is
TOMCAT_HOME/webapps.
- Parameters:
d
- A directory containing your applications.
If it's not an absoulte path, TOMCAT_HOME will be used as base.
setPrefix
public void setPrefix(java.lang.String s)
- Add a prefix to all deployed context paths
setHost
public void setHost(java.lang.String h)
- All applications in the directory will be added to a
single virtual host. If not set, an encoding scheme
will be used to extract the virtual host name from
the application name. For backward compatibilty you
can set it to "DEFAULT". This is also usefull when you
want each virtual host to have it's own directory.
setIngoreDot
public void setIngoreDot(boolean b)
- Ignore directories starting with a "."
setFlat
public void setFlat(boolean b)
- Not implemented - default is true. If flat==false, virtual
hosts will be configured using the hierarchy in webapps.
( webapps/DEFAULT/, webapps/VHOST1, etc ).
setProfile
public void setProfile(java.lang.String s)
- Set the "profile" attribute on each context. This
can be used by a profile module to configure the
context with special settings.
setTrusted
public void setTrusted(boolean b)
- Set the trusted attribute to all apps. This is
used for "internal" apps, to reduce the number
of manual configurations. It works by creating
a special directory and using to
add all the apps inside with a trusted attribute.
setReloadable
public void setReloadable(boolean b)
setHostChar
public void setHostChar(java.lang.String c)
setHostDotChar
public void setHostDotChar(java.lang.String c)
setPathSlashChar
public void setPathSlashChar(java.lang.String c)
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.
Copyright © 2001 Apache Software Foundation. All Rights Reserved.