FAQ/Connectors

Preface

Please see the [WWW] Other Resources Link for other pages describing how they were able to link Tomcat with a connector. With luck, someone documented their experience in an environment which is similar to yours.

Here is a link to the [WWW] JK Connectors. It contains more configuration and installation information.

Please note, jk2 is no longer supported. Please use mod_jk instead.

Questions

  1. What is JK (or AJP)?

  2. Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?

  3. Why should I integrate Apache with Tomcat? (or not)

  4. At boot, is order of start up (Apache vs Tomcat) important?

  5. Is there any way to control the content of automatically generated mod_jk.conf-auto?

  6. How do I bind to a specific ip address?

  7. Where can I download a binary distribution of my connector?

  8. I'm having strange UTF-8 issues with my request parameters.

Answers

What is JK (or AJP)?

AJP is a wire protocol. It an optimized version of the HTTP protocol to allow a standalone web server such as Apache talk to Tomcat. Historically, Apache has always been much faster than Tomcat at serving static content. The idea is to let Apache serve the static content when possible, then proxy the request back to Tomcat for Tomcat related content.

Which connector: mod_jserv, JK, JK2, mod_webapp or mod_proxy?

Why should I integrate Apache with Tomcat? (or not)

There are many reasons to integrate Tomcat with Apache. And there are reasons why it should not be done too. Needless to say, everyone will disagree with the opinions here. With the performance of Tomcat 5 and 6, performance reasons become harder to justify. So here are the issues to discuss in integrating vs not.

At boot, is order of start up (Apache vs Tomcat) important?

No. This way - either apache or tomcat can be restarted at any time independent of one another.

Is there any way to control the content of automatically generated mod_jk.conf-auto? I need my own specific commands added to it.

There really is no need to. Just copy the automatically generated mod_jk.conf-auto and edit it manually to your preference. None of production tomcat installations really use mod_jk.conf-auto as it is.

How do I bind to a specific ip address?

Each Connector element allows an address property. For example:

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" 
           address="192.168.1.1"
           port="8080" minProcessors="5" maxProcessors="75"
           enableLookups="true" redirectPort="8443"
           acceptCount="100" debug="0" connectionTimeout="20000"
           useURIValidationHack="false" disableUploadTimeout="true" />

For a more complete description of the Connector config, see the [WWW] HTTP Connector docs or the see the [WWW] AJP Connector docs.

Where can I download a binary distribution of my connector?

You can't: you need to download the source and compile it for your platform. The source distributions are available from the [WWW] standard location. Note that JPackage.org has RPM distributions for the connectors as well as tomcat itself: [WWW] JPackage.org

I'm having strange UTF-8 issues with my request parameters.

See Character Encoding

last edited 2009-05-22 15:12:15 by markt