Java Doc for ApacheConfig.java in  » Sevlet-Container » apache-tomcat-6.0.14 » org » apache » jk » config » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Sevlet Container » apache tomcat 6.0.14 » org.apache.jk.config 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.jk.config.BaseJkConfig
      org.apache.jk.config.ApacheConfig

ApacheConfig
public class ApacheConfig extends BaseJkConfig (Code)
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:
  • 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.
  • jkConfig - path to use for writing Apache mod_jk conf file. If not set, defaults to "conf/auto/mod_jk.conf".
  • workersConfig - path to workers.properties file used by mod_jk. If not set, defaults to "conf/jk/workers.properties".
  • modJk - path to Apache mod_jk plugin file. If not set, defaults to "modules/mod_jk.dll" on windows, "modules/mod_jk.nlm" on netware, and "libexec/mod_jk.so" everywhere else.
  • jkLog - path to log file to be used by mod_jk.
  • jkDebug - JK 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 Apache serve static resources. The default is true. Warning: When false, some configuration in the web.xml may not be duplicated in Apache. Review the mod_jk conf file to see what configuration is actually being set in Apache.
  • 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 DocumentRoot setting in Apache's httpd.conf file to point to Tomcat's root context directory. Otherwise some content, such as Apache's index.html, will be served by Apache before mod_jk gets a chance to claim the request and pass it to Tomcat. The default is true.


author:
   Costin Manolache
author:
   Larry Isaacs
author:
   Mel Martinez
author:
   Bill Barker



Field Summary
final public static  StringJK_LOG_LOCATION
    
final public static  StringMOD_JK
     default location of mod_jk Apache plug-in.
final public static  StringMOD_JK_CONFIG
    
 HashtableNamedVirtualHosts
    
final public static  StringWORKERS_CONFIG
     default path to workers.properties file This should be also auto-generated from server.xml.
 Stringindent
    

Constructor Summary
public  ApacheConfig()
    

Method Summary
protected  booleanaddExtensionMapping(String ctxPath, String ext, PrintWriter mod_jk)
     Add an Apache extension mapping.
protected  booleanaddMapping(String fullPath, PrintWriter mod_jk)
     Add a fulling specified Appache mapping.
protected  booleanaddMapping(String ctxP, String ext, PrintWriter mod_jk)
     Add a partially specified Appache mapping.
protected  voidgenerateContextMappings(Context context, PrintWriter mod_jk)
    
protected  booleangenerateJkHead(PrintWriter mod_jk)
    
protected  voidgenerateSSLConfig(PrintWriter mod_jk)
    
protected  voidgenerateStupidMappings(Context context, PrintWriter mod_jk)
     Forward all requests for a context to tomcat.
protected  voidgenerateVhostHead(Host host, PrintWriter mod_jk)
    
protected  voidgenerateVhostTail(Host host, PrintWriter mod_jk)
    
protected  PrintWritergetWriter()
    
protected  voidinitProperties()
    
public  voidsetCertsIndicator(String s)
    
public  voidsetCipherIndicator(String s)
    
public  voidsetExtractSSL(boolean sslMode)
     By default mod_jk is configured to collect SSL information from the apache environment and send it to the Tomcat workers.
public  voidsetHttpsIndicator(String s)
    
public  voidsetJkConfig(String path)
     set the path to the output file for the auto-generated mod_jk configuration file.
public  voidsetModJk(String path)
    
public  voidsetSessionIndicator(String s)
    

Field Detail
JK_LOG_LOCATION
final public static String JK_LOG_LOCATION(Code)
default mod_jk log file location



MOD_JK
final public static String MOD_JK(Code)
default location of mod_jk Apache plug-in.



MOD_JK_CONFIG
final public static String MOD_JK_CONFIG(Code)
default path to mod_jk .conf location



NamedVirtualHosts
Hashtable NamedVirtualHosts(Code)



WORKERS_CONFIG
final public static String WORKERS_CONFIG(Code)
default path to workers.properties file This should be also auto-generated from server.xml.



indent
String indent(Code)




Constructor Detail
ApacheConfig
public ApacheConfig()(Code)




Method Detail
addExtensionMapping
protected boolean addExtensionMapping(String ctxPath, String ext, PrintWriter mod_jk)(Code)
Add an Apache extension mapping.



addMapping
protected boolean addMapping(String fullPath, PrintWriter mod_jk)(Code)
Add a fulling specified Appache mapping.



addMapping
protected boolean addMapping(String ctxP, String ext, PrintWriter mod_jk)(Code)
Add a partially specified Appache mapping.



generateContextMappings
protected void generateContextMappings(Context context, PrintWriter mod_jk)(Code)



generateJkHead
protected boolean generateJkHead(PrintWriter mod_jk)(Code)
Generate the loadModule and general options



generateSSLConfig
protected void generateSSLConfig(PrintWriter mod_jk)(Code)



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



generateVhostHead
protected void generateVhostHead(Host host, PrintWriter mod_jk)(Code)



generateVhostTail
protected void generateVhostTail(Host host, PrintWriter mod_jk)(Code)



getWriter
protected PrintWriter getWriter() throws IOException(Code)



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



setCertsIndicator
public void setCertsIndicator(String s)(Code)
What is the indicator for the client SSL certificated(default is SSL_CLIENT_CERT



setCipherIndicator
public void setCipherIndicator(String s)(Code)
What is the indicator for client SSL cipher suit (default is SSL_CIPHER)



setExtractSSL
public void setExtractSSL(boolean sslMode)(Code)
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)



setHttpsIndicator
public void setHttpsIndicator(String s)(Code)
What is the indicator for SSL (default is HTTPS)



setJkConfig
public void setJkConfig(String path)(Code)
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.


Parameters:
  path - String path to a file




setModJk
public void setModJk(String path)(Code)
set the path to the mod_jk Apache Module
Parameters:
  path - String path to a file



setSessionIndicator
public void setSessionIndicator(String s)(Code)
What is the indicator for SSL session (default is SSL_SESSION_ID)



Fields inherited from org.apache.jk.config.BaseJkConfig
protected boolean append(Code)(Java Doc)
protected File configHome(Code)(Java Doc)
protected boolean forwardAll(Code)(Java Doc)
protected String jkDebug(Code)(Java Doc)
protected File jkLog(Code)(Java Doc)
protected String jkWorker(Code)(Java Doc)
protected boolean legacy(Code)(Java Doc)
protected boolean noRoot(Code)(Java Doc)
protected boolean regenerate(Code)(Java Doc)
protected String tomcatHome(Code)(Java Doc)
protected File workersConfig(Code)(Java Doc)

Methods inherited from org.apache.jk.config.BaseJkConfig
protected boolean addExtensionMapping(String ctxPath, String ext, PrintWriter pw)(Code)(Java Doc)
protected boolean addMapping(String fullPath, PrintWriter pw)(Code)(Java Doc)
public void execute(LifecycleEvent evt)(Code)(Java Doc)
public void executeContext(Context context, PrintWriter mod_jk)(Code)(Java Doc)
protected void executeEngine(Engine egn, PrintWriter mod_jk)(Code)(Java Doc)
protected void executeHost(Host hst, PrintWriter mod_jk)(Code)(Java Doc)
public void executeServer(Server svr, PrintWriter mod_jk)(Code)(Java Doc)
protected void generateContextMappings(Context context, PrintWriter mod_jk)(Code)(Java Doc)
protected boolean generateJkHead(PrintWriter mod_jk)(Code)(Java Doc)
protected void generateJkTail(PrintWriter mod_jk)(Code)(Java Doc)
protected void generateSSLConfig(PrintWriter mod_jk)(Code)(Java Doc)
protected void generateStupidMappings(Context context, PrintWriter mod_jk)(Code)(Java Doc)
protected void generateVhostHead(Host host, PrintWriter mod_jk)(Code)(Java Doc)
protected void generateVhostTail(Host host, PrintWriter mod_jk)(Code)(Java Doc)
protected String getAbsoluteDocBase(Context context)(Code)(Java Doc)
public static File getConfigFile(File base, File configDir, String defaultF)(Code)(Java Doc)
protected Host getHost(Container child)(Code)(Java Doc)
protected PrintWriter getWriter() throws IOException(Code)(Java Doc)
protected void initProperties()(Code)(Java Doc)
public static boolean isAbsolute(String path)(Code)(Java Doc)
public void lifecycleEvent(LifecycleEvent evt)(Code)(Java Doc)
public static String patch(String path)(Code)(Java Doc)
public void setAppend(boolean apnd)(Code)(Java Doc)
public void setConfigHome(String dir)(Code)(Java Doc)
public void setForwardAll(boolean b)(Code)(Java Doc)
public void setJkDebug(String level)(Code)(Java Doc)
public void setJkLog(String path)(Code)(Java Doc)
public void setJkWorker(String worker)(Code)(Java Doc)
public void setLegacy(boolean legacy)(Code)(Java Doc)
public void setNoRoot(boolean b)(Code)(Java Doc)
public void setWorkersConfig(String path)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.