Apache Tomcat 6.0.53

org.apache.jk.config
Class NSConfig

java.lang.Object
  extended by org.apache.jk.config.BaseJkConfig
      extended by org.apache.jk.config.NSConfig
All 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:

 < 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 java.lang.String NS_CONFIG
           
static java.lang.String NSAPI_LOG_LOCATION
           
static java.lang.String NSAPI_REDIRECTOR
          default location of nsapi plug-in.
static java.lang.String WORKERS_CONFIG
           
 
Fields inherited from class org.apache.jk.config.BaseJkConfig
append, configHome, forwardAll, jkDebug, jkLog, jkWorker, legacy, noRoot, regenerate, tomcatHome, workersConfig
 
Constructor Summary
NSConfig()
           
 
Method Summary
protected  boolean addMapping(java.lang.String fullPath, java.io.PrintWriter objfile)
          Add a fulling specified Netscape mapping.
protected  boolean addMapping(java.lang.String ctxPath, java.lang.String ext, java.io.PrintWriter objfile)
          Add a Netscape extension mapping.
protected  void generateContextMappings(Context context, java.io.PrintWriter objfile)
           
protected  boolean generateJkHead(java.io.PrintWriter mod_jk)
          Generate general options
protected  void generateJkTail(java.io.PrintWriter objfile)
          Generate general options
protected  void generateStupidMappings(Context context, java.io.PrintWriter objfile)
          Forward all requests for a context to tomcat.
protected  java.io.PrintWriter getWriter()
          Get the output Writer.
protected  void initProperties()
          Initialize defaults for properties that are not set explicitely
 void setNsapiJk(java.lang.String path)
          set the path to the nsapi plugin module
 void setObjConfig(java.lang.String path)
          set the path to the output file for the auto-generated isapi_redirect registry file.
 void setObjectName(java.lang.String name)
          Set the name for the Object that implements the jk_service call.
 
Methods inherited from class org.apache.jk.config.BaseJkConfig
addExtensionMapping, execute, executeContext, executeEngine, executeHost, executeServer, generateSSLConfig, generateVhostHead, generateVhostTail, getAbsoluteDocBase, getConfigFile, getHost, isAbsolute, lifecycleEvent, patch, setAppend, setConfigHome, setForwardAll, setJkDebug, setJkLog, setJkWorker, setLegacy, 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

NS_CONFIG

public static final java.lang.String NS_CONFIG
See Also:
Constant Field Values

NSAPI_LOG_LOCATION

public static final java.lang.String NSAPI_LOG_LOCATION
See Also:
Constant Field Values

NSAPI_REDIRECTOR

public static final java.lang.String NSAPI_REDIRECTOR
default location of nsapi plug-in.

Constructor Detail

NSConfig

public NSConfig()
Method Detail

setObjConfig

public void setObjConfig(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.

Parameters:
path - String path to a file

setNsapiJk

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

Parameters:
path - String path to a file

setObjectName

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

Parameters:
name - Name of the obj.conf Object

initProperties

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

Overrides:
initProperties in class BaseJkConfig

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:
getWriter in class BaseJkConfig
Throws:
java.io.IOException

generateJkHead

protected boolean generateJkHead(java.io.PrintWriter mod_jk)
Description copied from class: BaseJkConfig
Generate general options

Overrides:
generateJkHead in class BaseJkConfig

generateJkTail

protected void generateJkTail(java.io.PrintWriter objfile)
Description copied from class: BaseJkConfig
Generate general options

Overrides:
generateJkTail in class BaseJkConfig

generateStupidMappings

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

Overrides:
generateStupidMappings in class BaseJkConfig

generateContextMappings

protected void generateContextMappings(Context context,
                                       java.io.PrintWriter objfile)
Overrides:
generateContextMappings in class BaseJkConfig

addMapping

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


addMapping

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

Overrides:
addMapping in class BaseJkConfig

Apache Tomcat 6.0.53

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