Save This Page
Home » apache-tomcat-6.0.26-src » org.apache.jk » config » [javadoc | source]
org.apache.jk.config
public class: ApacheConfig [javadoc | source]
java.lang.Object
   org.apache.jk.config.BaseJkConfig
      org.apache.jk.config.ApacheConfig

All Implemented Interfaces:
    LifecycleListener

Generates automatic apache mod_jk configurations based on the Tomcat server.xml settings and the war contexts initialized during startup.

This config interceptor is enabled by inserting an ApacheConfig Listener in the server.xml file like so:

< Server ... >
  ...
  org.apache.ajp.tomcat4.config.ApacheConfig 
      options />
  ...
< /Server >
where options can include any of the following attributes:

Field Summary
public static final  String MOD_JK_CONFIG    default path to mod_jk .conf location 
public static final  String WORKERS_CONFIG    default path to workers.properties file This should be also auto-generated from server.xml. 
public static final  String JK_LOG_LOCATION    default mod_jk log file location 
public static final  String MOD_JK    default location of mod_jk Apache plug-in. 
 Hashtable NamedVirtualHosts     
 String indent     
Fields inherited from org.apache.jk.config.BaseJkConfig:
configHome,  workersConfig,  jkLog,  jkDebug,  jkWorker,  noRoot,  forwardAll,  tomcatHome,  regenerate,  append,  legacy
Constructor:
 public ApacheConfig() 
Method from org.apache.jk.config.ApacheConfig Summary:
addExtensionMapping,   addMapping,   addMapping,   generateContextMappings,   generateJkHead,   generateSSLConfig,   generateStupidMappings,   generateVhostHead,   generateVhostTail,   getWriter,   initProperties,   setCertsIndicator,   setCipherIndicator,   setExtractSSL,   setHttpsIndicator,   setJkConfig,   setModJk,   setSessionIndicator
Methods from org.apache.jk.config.BaseJkConfig:
addExtensionMapping,   addMapping,   execute,   executeContext,   executeEngine,   executeHost,   executeServer,   generateContextMappings,   generateJkHead,   generateJkTail,   generateSSLConfig,   generateStupidMappings,   generateVhostHead,   generateVhostTail,   getAbsoluteDocBase,   getConfigFile,   getHost,   getWriter,   initProperties,   isAbsolute,   lifecycleEvent,   patch,   setAppend,   setConfigHome,   setForwardAll,   setJkDebug,   setJkLog,   setJkWorker,   setLegacy,   setNoRoot,   setWorkersConfig
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jk.config.ApacheConfig Detail:
 protected boolean addExtensionMapping(String ctxPath,
    String ext,
    PrintWriter mod_jk) 
    Add an Apache extension mapping.
 protected boolean addMapping(String fullPath,
    PrintWriter mod_jk) 
    Add a fulling specified Appache mapping.
 protected boolean addMapping(String ctxP,
    String ext,
    PrintWriter mod_jk) 
    Add a partially specified Appache mapping.
 protected  void generateContextMappings(Context context,
    PrintWriter mod_jk) 
 protected boolean generateJkHead(PrintWriter mod_jk) 
    Generate the loadModule and general options
 protected  void generateSSLConfig(PrintWriter mod_jk) 
 protected  void generateStupidMappings(Context context,
    PrintWriter mod_jk) 
    Forward all requests for a context to tomcat. The default.
 protected  void generateVhostHead(Host host,
    PrintWriter mod_jk) 
 protected  void generateVhostTail(Host host,
    PrintWriter mod_jk) 
 protected PrintWriter getWriter() throws IOException 
 protected  void initProperties() 
    Initialize defaults for properties that are not set explicitely
 public  void setCertsIndicator(String s) 
    What is the indicator for the client SSL certificated(default is SSL_CLIENT_CERT
 public  void setCipherIndicator(String s) 
    What is the indicator for client SSL cipher suit (default is SSL_CIPHER)
 public  void setExtractSSL(boolean sslMode) 
    By default mod_jk is configured to collect SSL information from the apache environment and send it to the Tomcat workers. The problem is that there are many SSL solutions for Apache and as a result the environment variable names may change. The following JK related SSL configureation can be used to customize mod_jk's SSL behaviour. Should mod_jk send SSL information to Tomact (default is On)
 public  void setHttpsIndicator(String s) 
    What is the indicator for SSL (default is HTTPS)
 public  void setJkConfig(String path) 
    set the path to the output file for the auto-generated mod_jk configuration file. If this path is relative then it will be resolved absolutely against the getConfigHome() path.

 public  void setModJk(String path) 
    set the path to the mod_jk Apache Module
 public  void setSessionIndicator(String s) 
    What is the indicator for SSL session (default is SSL_SESSION_ID)