|
|||||||||
| Home >> All >> org >> apache >> ajp >> tomcat4 >> [ config overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.ajp.tomcat4.config
Class IISConfig

java.lang.Objectorg.apache.ajp.tomcat4.config.BaseJkConfig
org.apache.ajp.tomcat4.config.IISConfig
- All Implemented Interfaces:
- org.apache.catalina.LifecycleListener
- public class IISConfig
- extends BaseJkConfig
Generates automatic IIS isapi_redirect configurations based on the Tomcat server.xml settings and the war contexts initialized during startup.
This config interceptor is enabled by inserting an IISConfig element in the <ContextManager> tag body inside the server.xml file like so:
< ContextManager ... >
...
<IISConfig options />
...
< /ContextManager >
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.
- regConfig - path to use for writing IIS isapi_redirect registry file. If not set, defaults to "conf/auto/iis_redirect.reg".
- workersConfig - path to workers.properties file used by isapi_redirect. If not set, defaults to "conf/jk/workers.properties".
- uriConfig - path to use for writing IIS isapi_redirect uriworkermap file. If not set, defaults to "conf/auto/uriworkermap.properties".
- jkLog - path to log file to be used by isapi_redirect.
- jkDebug - 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 IIS serve static resources assuming it has been configured to do so. The default is true. Warning: When false, some configuration in the web.xml may not be duplicated in IIS. Review the uriworkermap file to see what configuration is actually being set in IIS.
- 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 Home Directory setting in IIS to point to Tomcat's root context directory. Otherwise some content, such as the root index.html, will be served by IIS before isapi_redirect gets a chance to claim the request and pass it to Tomcat. The default is true.
| Field Summary | |
static java.lang.String |
ISAPI_LOG_LOCATION
|
static java.lang.String |
ISAPI_REG_FILE
|
private java.io.File |
regConfig
|
static java.lang.String |
URI_WORKERS_MAP_CONFIG
|
private java.io.File |
uriConfig
|
static java.lang.String |
WORKERS_CONFIG
|
| Fields inherited from class org.apache.ajp.tomcat4.config.BaseJkConfig |
append, configHome, debug, forwardAll, jkDebug, jkLog, jkWorker, noRoot, regenerate, tomcatHome, workersConfig |
| Constructor Summary | |
IISConfig()
|
|
| Method Summary | |
protected boolean |
addMapping(java.lang.String fullPath,
java.io.PrintWriter uri_worker)
Add a fulling specified IIS mapping. |
protected boolean |
addMapping(java.lang.String ctxPath,
java.lang.String ext,
java.io.PrintWriter uri_worker)
Add an IIS extension mapping. |
private java.lang.String |
dubleSlash(java.lang.String in)
|
protected void |
generateContextMappings(org.apache.catalina.Context context,
java.io.PrintWriter uri_worker)
|
protected boolean |
generateJkHead(java.io.PrintWriter mod_jk)
Generate general options |
private void |
generateRegistrySettings(java.io.PrintWriter regfile)
Writes the registry settings required by the IIS connector |
protected void |
generateStupidMappings(org.apache.catalina.Context context,
java.io.PrintWriter uri_worker)
Forward all requests for a context to tomcat. |
private void |
generateUriWorkerHeader(java.io.PrintWriter uri_worker)
Writes the header information to the uriworkermap file |
protected java.io.PrintWriter |
getWriter()
Get the output Writer. |
protected void |
initProperties()
Initialize defaults for properties that are not set explicitely |
void |
setRegConfig(java.lang.String path)
set the path to the output file for the auto-generated isapi_redirect registry file. |
void |
setUriConfig(java.lang.String path)
set a path to the uriworkermap.properties file. |
| Methods inherited from class org.apache.ajp.tomcat4.config.BaseJkConfig |
addExtensionMapping, execute, executeContext, executeEngine, executeHost, executeServer, generateJkTail, generateSSLConfig, generateVhostHead, generateVhostTail, getAbsoluteDocBase, getConfigFile, getHost, isAbsolute, lifecycleEvent, log, patch, setAppend, setConfigHome, setForwardAll, setJkDebug, setJkLog, setJkWorker, setNoRoot, setWorkersConfig |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
WORKERS_CONFIG
public static final java.lang.String WORKERS_CONFIG
- See Also:
- Constant Field Values
URI_WORKERS_MAP_CONFIG
public static final java.lang.String URI_WORKERS_MAP_CONFIG
- See Also:
- Constant Field Values
ISAPI_LOG_LOCATION
public static final java.lang.String ISAPI_LOG_LOCATION
- See Also:
- Constant Field Values
ISAPI_REG_FILE
public static final java.lang.String ISAPI_REG_FILE
- See Also:
- Constant Field Values
regConfig
private java.io.File regConfig
uriConfig
private java.io.File uriConfig
| Constructor Detail |
IISConfig
public IISConfig()
| Method Detail |
setRegConfig
public void setRegConfig(java.lang.String path)
- set the path to the output file for the auto-generated
isapi_redirect registry file. If this path is relative
then getRegConfig() will resolve it absolutely against
the getConfigHome() path.
setUriConfig
public void setUriConfig(java.lang.String path)
- set a path to the uriworkermap.properties file.
initProperties
protected void initProperties()
- Initialize defaults for properties that are not set
explicitely
- Overrides:
initPropertiesin classBaseJkConfig
getWriter
protected java.io.PrintWriter getWriter() throws java.io.IOException
- Description copied from class:
BaseJkConfig - Get the output Writer. Override with method to generate
web server specific configuration.
- Overrides:
getWriterin classBaseJkConfig
generateJkHead
protected boolean generateJkHead(java.io.PrintWriter mod_jk)
- Description copied from class:
BaseJkConfig - Generate general options
- Overrides:
generateJkHeadin classBaseJkConfig
generateRegistrySettings
private void generateRegistrySettings(java.io.PrintWriter regfile)
- Writes the registry settings required by the IIS connector
generateUriWorkerHeader
private void generateUriWorkerHeader(java.io.PrintWriter uri_worker)
- Writes the header information to the uriworkermap file
generateStupidMappings
protected void generateStupidMappings(org.apache.catalina.Context context, java.io.PrintWriter uri_worker)
- Forward all requests for a context to tomcat.
The default.
- Overrides:
generateStupidMappingsin classBaseJkConfig
generateContextMappings
protected void generateContextMappings(org.apache.catalina.Context context, java.io.PrintWriter uri_worker)
- Overrides:
generateContextMappingsin classBaseJkConfig
addMapping
protected boolean addMapping(java.lang.String ctxPath, java.lang.String ext, java.io.PrintWriter uri_worker)
- Add an IIS extension mapping.
addMapping
protected boolean addMapping(java.lang.String fullPath, java.io.PrintWriter uri_worker)
- Add a fulling specified IIS mapping.
- Overrides:
addMappingin classBaseJkConfig
dubleSlash
private java.lang.String dubleSlash(java.lang.String in)
|
|||||||||
| Home >> All >> org >> apache >> ajp >> tomcat4 >> [ config overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC