| java.lang.Object org.apache.ajp.tomcat4.config.BaseJkConfig org.apache.ajp.tomcat4.config.ApacheConfig
ApacheConfig | public class ApacheConfig extends BaseJkConfig (Code) | | Generates automatic apache mod_jk configurations based on
the Tomcat server.xml settings and the war contexts
initialized during startup.
This config interceptor is enabled by inserting an ApacheConfig
Listener in
the server.xml file like so:
< Server ... >
...
org.apache.ajp.tomcat4.config.ApacheConfig
options />
...
< /Server >
where options can include any of the following attributes:
- configHome - default parent directory for the following paths.
If not set, this defaults to TOMCAT_HOME. Ignored
whenever any of the following paths is absolute.
- jkConfig - path to use for writing Apache mod_jk conf file. If
not set, defaults to
"conf/auto/mod_jk.conf".
- workersConfig - path to workers.properties file used by
mod_jk. If not set, defaults to
"conf/jk/workers.properties".
- modJk - path to Apache mod_jk plugin file. If not set,
defaults to "modules/mod_jk.dll" on windows,
"modules/mod_jk.nlm" on netware, and
"libexec/mod_jk.so" everywhere else.
- jkLog - path to log file to be used by mod_jk.
- jkDebug - JK Loglevel setting. May be debug, info, error, or emerg.
If not set, defaults to emerg.
- jkWorker The desired worker. Must be set to one of the workers
defined in the workers.properties file. "ajp12", "ajp13"
or "inprocess" are the workers found in the default
workers.properties file. If not specified, defaults
to "ajp13" if an Ajp13Interceptor is in use, otherwise
it defaults to "ajp12".
- forwardAll - If true, forward all requests to Tomcat. This helps
insure that all the behavior configured in the web.xml
file functions correctly. If false, let Apache serve
static resources. The default is true.
Warning: When false, some configuration in
the web.xml may not be duplicated in Apache.
Review the mod_jk conf file to see what
configuration is actually being set in Apache.
- noRoot - If true, the root context is not mapped to
Tomcat. If false and forwardAll is true, all requests
to the root context are mapped to Tomcat. If false and
forwardAll is false, only JSP and servlets requests to
the root context are mapped to Tomcat. When false,
to correctly serve Tomcat's root context you must also
modify the DocumentRoot setting in Apache's httpd.conf
file to point to Tomcat's root context directory.
Otherwise some content, such as Apache's index.html,
will be served by Apache before mod_jk gets a chance
to claim the request and pass it to Tomcat.
The default is true.
author: Costin Manolache author: Larry Isaacs author: Mel Martinez author: Bill Barker |
JK_LOG_LOCATION | final public static String JK_LOG_LOCATION(Code) | | default mod_jk log file location
|
MOD_JK | final public static String MOD_JK(Code) | | default location of mod_jk Apache plug-in.
|
MOD_JK_CONFIG | final public static String MOD_JK_CONFIG(Code) | | default path to mod_jk .conf location
|
WORKERS_CONFIG | final public static String WORKERS_CONFIG(Code) | | default path to workers.properties file
This should be also auto-generated from server.xml.
|
ApacheConfig | public ApacheConfig()(Code) | | |
addMapping | protected boolean addMapping(String fullPath, PrintWriter mod_jk)(Code) | | Add a fulling specified Appache mapping.
|
generateContextMappings | protected void generateContextMappings(Context context, PrintWriter mod_jk)(Code) | | |
generateJkHead | protected boolean generateJkHead(PrintWriter mod_jk)(Code) | | Generate the loadModule and general options
|
generateStupidMappings | protected void generateStupidMappings(Context context, PrintWriter mod_jk)(Code) | | Forward all requests for a context to tomcat.
The default.
|
generateVhostHead | protected void generateVhostHead(Host host, PrintWriter mod_jk)(Code) | | |
generateVhostTail | protected void generateVhostTail(Host host, PrintWriter mod_jk)(Code) | | |
initProperties | protected void initProperties()(Code) | | Initialize defaults for properties that are not set
explicitely
|
setCertsIndicator | public void setCertsIndicator(String s)(Code) | | What is the indicator for the client SSL certificated(default
is SSL_CLIENT_CERT
|
setCipherIndicator | public void setCipherIndicator(String s)(Code) | | What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
|
setExtractSSL | public void setExtractSSL(boolean sslMode)(Code) | | By default mod_jk is configured to collect SSL information from
the apache environment and send it to the Tomcat workers. The
problem is that there are many SSL solutions for Apache and as
a result the environment variable names may change.
The following JK related SSL configureation
can be used to customize mod_jk's SSL behaviour.
Should mod_jk send SSL information to Tomact (default is On)
|
setHttpsIndicator | public void setHttpsIndicator(String s)(Code) | | What is the indicator for SSL (default is HTTPS)
|
setJkConfig | public void setJkConfig(String path)(Code) | | set the path to the output file for the auto-generated
mod_jk configuration file. If this path is relative
then it will be resolved absolutely against
the getConfigHome() path.
path String path to a file |
setModJk | public void setModJk(String path)(Code) | | set the path to the mod_jk Apache Module
path String path to a file |
setSessionIndicator | public void setSessionIndicator(String s)(Code) | | What is the indicator for SSL session (default is SSL_SESSION_ID)
|
Methods inherited from org.apache.ajp.tomcat4.config.BaseJkConfig | protected boolean addExtensionMapping(String ctxPath, String ext, PrintWriter pw)(Code)(Java Doc) protected boolean addMapping(String fullPath, PrintWriter pw)(Code)(Java Doc) public void execute(LifecycleEvent evt)(Code)(Java Doc) public void executeContext(Context context, PrintWriter mod_jk)(Code)(Java Doc) protected void executeEngine(Engine egn, PrintWriter mod_jk)(Code)(Java Doc) protected void executeHost(Host hst, PrintWriter mod_jk)(Code)(Java Doc) public void executeServer(Server svr, PrintWriter mod_jk)(Code)(Java Doc) protected void generateContextMappings(Context context, PrintWriter mod_jk)(Code)(Java Doc) protected boolean generateJkHead(PrintWriter mod_jk)(Code)(Java Doc) protected void generateJkTail(PrintWriter mod_jk)(Code)(Java Doc) protected void generateSSLConfig(PrintWriter mod_jk)(Code)(Java Doc) protected void generateStupidMappings(Context context, PrintWriter mod_jk)(Code)(Java Doc) protected void generateVhostHead(Host host, PrintWriter mod_jk)(Code)(Java Doc) protected void generateVhostTail(Host host, PrintWriter mod_jk)(Code)(Java Doc) protected String getAbsoluteDocBase(Context context)(Code)(Java Doc) public static File getConfigFile(File base, File configDir, String defaultF)(Code)(Java Doc) protected Host getHost(Container child)(Code)(Java Doc) protected PrintWriter getWriter() throws IOException(Code)(Java Doc) protected void initProperties()(Code)(Java Doc) public static boolean isAbsolute(String path)(Code)(Java Doc) public void lifecycleEvent(LifecycleEvent evt)(Code)(Java Doc) protected void log(String msg)(Code)(Java Doc) public static String patch(String path)(Code)(Java Doc) public void setAppend(boolean apnd)(Code)(Java Doc) public void setConfigHome(String dir)(Code)(Java Doc) public void setForwardAll(boolean b)(Code)(Java Doc) public void setJkDebug(String level)(Code)(Java Doc) public void setJkLog(String path)(Code)(Java Doc) public void setJkWorker(String worker)(Code)(Java Doc) public void setNoRoot(boolean b)(Code)(Java Doc) public void setWorkersConfig(String path)(Code)(Java Doc)
|
|
|