Sunday, October 25, 2009

Using Coyote HTTP with Tomcat 3.3.x





























Chapter 10 -
HTTP Connectors
byVivek Chopra, Ben Galbraithet al.
Wrox Press 2003































Using Coyote HTTP with Tomcat 3.3.x


The steps for using the Coyote HTTP connector with Tomcat 3.3.x are listed below. In the instructions that follow, $TOMCAT_HOME is the install directory of Tomcat 3.3.x.




  • Download the latest stable Coyote release from http://jakarta.apache.org/builds/jakarta-tomcat-connectors/coyote/release/. The release consists of a number of JAR files.




  • Copy tomcat33-resource.jar to $TOMCAT_HOME/lib/common.




  • Replace $TOMCAT_HOME/lib/common/connector_util.jar with tomcat-util.jar.




  • Copy tomcat-http11.jar to $TOMCAT_HOME/lib/container.




  • Copy tomcat-jni.jar to $TOMCAT_HOME/bin.




  • Copy tomcat33-coyote.jar to $TOMCAT_HOME/lib/container.




  • Copy commons-logging.jar to $TOMCAT_HOME/lib/container.




  • Add the following XML fragment to $TOMCAT_HOME/conf/modules.xml.




    <module name="CoyoteConnector"
    javaClass="org.apache.coyote.tomcat3.CoyoteInterceptor2"/>




  • Add the <CoyoteConnector> element to $TOMCAT_HOME/conf/server.xml as a child of the <ContextManager> element. The following is a sample configuration:




    <ContextManager workDir="work" >
    ...
    <CoyoteConnector port="8081" secure="false"
    maxThreads="100" maxSpareThreads="50"
    minSpareThreads="10" />
    ...




The port attribute (8081 above) is the port number that this connector serves HTTP requests on. The port attribute can be modified, but be sure to check with ports used by the other connectors.

















No comments: