org.apache.jk.config

Class NSConfig

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:

 < ContextManager ... >
   ...
   <NSConfig options />
   ...
 < /ContextManager >
    
where options can include any of the following attributes:

Author: Costin Manolache Larry Isaacs Gal Shachor Bill Barker

Field Summary
static StringNSAPI_LOG_LOCATION
static StringNSAPI_REDIRECTOR
default location of nsapi plug-in.
static StringNS_CONFIG
static StringWORKERS_CONFIG
Constructor Summary
NSConfig()
Method Summary
protected booleanaddMapping(String ctxPath, String ext, PrintWriter objfile)
Add a Netscape extension mapping.
protected booleanaddMapping(String fullPath, PrintWriter objfile)
Add a fulling specified Netscape mapping.
protected voidgenerateContextMappings(Context context, PrintWriter objfile)
protected booleangenerateJkHead(PrintWriter mod_jk)
protected voidgenerateJkTail(PrintWriter objfile)
protected voidgenerateStupidMappings(Context context, PrintWriter objfile)
Forward all requests for a context to tomcat.
protected PrintWritergetWriter()
protected voidinitProperties()
Initialize defaults for properties that are not set explicitely
voidsetNsapiJk(String path)
set the path to the nsapi plugin module
voidsetObjConfig(String path)
set the path to the output file for the auto-generated isapi_redirect registry file.
voidsetObjectName(String name)
Set the name for the Object that implements the jk_service call.

Field Detail

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 Detail

NSConfig

public NSConfig()

Method Detail

addMapping

protected boolean addMapping(String ctxPath, String ext, PrintWriter objfile)
Add a Netscape extension mapping.

addMapping

protected boolean addMapping(String fullPath, PrintWriter objfile)
Add a fulling specified Netscape mapping.

generateContextMappings

protected void generateContextMappings(Context context, PrintWriter objfile)

generateJkHead

protected boolean generateJkHead(PrintWriter mod_jk)

generateJkTail

protected void generateJkTail(PrintWriter objfile)

generateStupidMappings

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

getWriter

protected PrintWriter getWriter()

initProperties

protected void initProperties()
Initialize defaults for properties that are not set explicitely

setNsapiJk

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

Parameters: path String path to a file

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: path String path to a file

setObjectName

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

Parameters: name Name of the obj.conf Object

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.