org.apache.ajp.tomcat4.config

Class NSConfig

Implemented Interfaces:
LifecycleListener

public class NSConfig
extends BaseJkConfig

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:

Authors:
Costin Manolache
Larry Isaacs
Gal Shachor
Bill Barker

Field Summary

static String
NSAPI_LOG_LOCATION
static String
NSAPI_REDIRECTOR
default location of nsapi plug-in.
static String
NS_CONFIG
static 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

NSConfig()

Method Summary

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.

Methods inherited from class org.apache.ajp.tomcat4.config.BaseJkConfig

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

Field Details

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

Constructor Details

NSConfig

public NSConfig()

Method Details

addMapping

protected boolean addMapping(String fullPath,
                             PrintWriter objfile)
Add a fulling specified Netscape mapping.
Overrides:
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)
Overrides:
generateContextMappings in interface BaseJkConfig


generateJkHead

protected boolean generateJkHead(PrintWriter mod_jk)
Overrides:
generateJkHead in interface BaseJkConfig


generateJkTail

protected void generateJkTail(PrintWriter objfile)
Overrides:
generateJkTail in interface BaseJkConfig


generateStupidMappings

protected void generateStupidMappings(Context context,
                                      PrintWriter objfile)
Forward all requests for a context to tomcat. The default.
Overrides:
generateStupidMappings in interface BaseJkConfig


getWriter

protected PrintWriter getWriter()
            throws IOException
Overrides:
getWriter in interface BaseJkConfig


initProperties

protected void initProperties()
Initialize defaults for properties that are not set explicitely
Overrides:
initProperties in interface BaseJkConfig


setNsapiJk

public void setNsapiJk(String path)
set the path to the nsapi plugin module

Parameters:


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.

Parameters:


setObjectName

public void setObjectName(String name)
Set the name for the Object that implements the jk_service call.

Parameters:


Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.