org.apache.ajp.tomcat4.config
Class NSConfig
- LifecycleListener
Generates automatic Netscape nsapi_redirect configurations based on
the Tomcat server.xml settings and the war contexts
initialized during startup.
This config interceptor is enabled by inserting an NSConfig
element in the
<ContextManager> tag body inside
the server.xml file like so:
<32ContextManager ... >
...
<<b>NSConfig options />
...
<32/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.
- objConfig - path to use for writing Netscape obj.conf
file. If not set, defaults to
"conf/auto/obj.conf".
- objectName - Name of the Object to execute the requests.
Defaults to "servlet".
- workersConfig - path to workers.properties file used by
nsapi_redirect. If not set, defaults to
"conf/jk/workers.properties".
- nsapiJk - path to Netscape mod_jk plugin file. If not set,
defaults to "bin/nsapi_redirect.dll" on windows,
"bin/nsapi_rd.nlm" on netware, and
"bin/nsapi_redirector.so" everywhere else.
- jkLog - path to log file to be used by nsapi_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 Netscape 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 Netscape.
Review the uriworkermap file to see what
configuration is actually being set in Netscape.
- 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 Netscape
to point to Tomcat's root context directory.
Otherwise some content, such as the root index.html,
will be served by Netscape before nsapi_redirect gets a chance
to claim the request and pass it to Tomcat.
The default is true.
- Costin Manolache
- Larry Isaacs
- Gal Shachor
- Bill Barker
append , configHome , debug , forwardAll , jkDebug , jkLog , jkWorker , noRoot , regenerate , tomcatHome , workersConfig |
protected boolean | addMapping(String fullPath, PrintWriter objfile) - Add a fulling specified Netscape mapping.
|
protected boolean | addMapping(String ctxPath, String ext, PrintWriter objfile) - Add a Netscape extension mapping.
|
protected void | generateContextMappings(Context context, PrintWriter objfile)
|
protected boolean | generateJkHead(PrintWriter mod_jk)
|
protected void | generateJkTail(PrintWriter objfile)
|
protected void | generateStupidMappings(Context context, PrintWriter objfile) - Forward all requests for a context to tomcat.
|
protected PrintWriter | getWriter()
|
protected void | initProperties() - Initialize defaults for properties that are not set
explicitely
|
void | setNsapiJk(String path) - set the path to the nsapi plugin module
|
void | setObjConfig(String path) - set the path to the output file for the auto-generated
isapi_redirect registry file.
|
void | setObjectName(String name) - Set the name for the Object that implements the
jk_service call.
|
addExtensionMapping , addMapping , execute , executeContext , executeEngine , executeHost , executeServer , generateContextMappings , generateJkHead , generateJkTail , generateSSLConfig , generateStupidMappings , generateVhostHead , generateVhostTail , getAbsoluteDocBase , getConfigFile , getHost , getWriter , initProperties , isAbsolute , lifecycleEvent , log , patch , setAppend , setConfigHome , setForwardAll , setJkDebug , setJkLog , setJkWorker , setNoRoot , setWorkersConfig |
NSAPI_LOG_LOCATION
public static final String NSAPI_LOG_LOCATION
NSAPI_REDIRECTOR
public static final String NSAPI_REDIRECTOR
default location of nsapi plug-in.
NS_CONFIG
public static final String NS_CONFIG
WORKERS_CONFIG
public static final String WORKERS_CONFIG
NSConfig
public NSConfig()
addMapping
protected boolean addMapping(String fullPath,
PrintWriter objfile)
Add a fulling specified Netscape mapping.
- addMapping in interface BaseJkConfig
addMapping
protected boolean addMapping(String ctxPath,
String ext,
PrintWriter objfile)
Add a Netscape extension mapping.
generateContextMappings
protected void generateContextMappings(Context context,
PrintWriter objfile)
- generateContextMappings in interface BaseJkConfig
generateJkHead
protected boolean generateJkHead(PrintWriter mod_jk)
- generateJkHead in interface BaseJkConfig
generateJkTail
protected void generateJkTail(PrintWriter objfile)
- generateJkTail in interface BaseJkConfig
generateStupidMappings
protected void generateStupidMappings(Context context,
PrintWriter objfile)
Forward all requests for a context to tomcat.
The default.
- generateStupidMappings in interface BaseJkConfig
getWriter
protected PrintWriter getWriter()
throws IOException
- getWriter in interface BaseJkConfig
initProperties
protected void initProperties()
Initialize defaults for properties that are not set
explicitely
- initProperties in interface BaseJkConfig
setNsapiJk
public void setNsapiJk(String path)
set the path to the nsapi plugin module
setObjConfig
public void setObjConfig(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.
setObjectName
public void setObjectName(String name)
Set the name for the Object that implements the
jk_service call.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.