The Tomcat Servlet/JSP Container

Apache Tomcat 4

Apache Logo


Top Level Elements

Current Connectors

Deprecated Connectors


Nested Components

Global Settings

The Coyote JK Connector

Printer Friendly Version

The Coyote JK Connector element represents a Connector component that communicates with a web connector via the JK protocol (also known as the AJP protocol). This is used for cases where you wish to invisibly integrate Tomcat 4 into an existing (or new) web server installation, and you want the web server to handle the static content contained in the web application, and/or utilize the web server's SSL processing. In many application environments, this will result in better overall performance than running your applications under Tomcat stand-alone using the Coyote HTTP/1.1 Connector. However, the only way to know for sure whether it will provide better performance for your application is to try it both ways.

This connector supports load balancing when used in conjunction with the jvmRoute attribute of the Engine.

Common Attributes

All implementations of Connector support the following attributes:


Java class name of the implementation to use. This class must implement the org.apache.catalina.Connector interface. You must specify the standard value defined below.


Set to true if you want calls to request.getRemoteHost() to perform DNS lookups in order to return the actual host name of the remote client. Set to false to skip the DNS lookup and return the IP address in String form instead (thereby improving performance). By default, DNS lookups are disabled.


If this Connector is supporting non-SSL requests, and a request is received for which a matching <security-constraint> requires SSL transport, Catalina will automatically redirect the request to the port number specified here.


Set this attribute to the name of the protocol you wish to have returned by calls to request.getScheme(). For example, you would set this attribute to "https" for an SSL Connector. The default value is "http".


Set this attribute to true if you wish to have calls to request.isSecure() to return true for requests received by this Connector (you would want this on an SSL Connector). The default value is false.

Standard Implementation

The standard implementation of Coyote JK Connector is org.apache.coyote.tomcat4.CoyoteConnector, but you must specify the protocolHandlerClassName attribute (see below).

This implementation supports the AJP/1.3 protocol.

It supports the following additional attributes (in addition to the common attributes listed above):


The maximum queue length for incoming connection requests when all possible request processing threads are in use. Any requests received when the queue is full will be refused. The default value is 10.


A boolean value which can be used to enable or disable the TRACE HTTP method. If not specified, this attribute is set to false.


The size of the output buffer to use. If less than or equal to zero, then output buffering is disabled. The default value is -1 (i.e. buffering disabled)


The number of milliseconds during which the sockets used by this Connector will linger when they are closed. The default value is -1 (socket linger is disabled).


The number of milliseconds this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is 60000 (i.e. 60 seconds).


The debugging detail level of log messages generated by this component, with higher numbers creating more detailed output. If not specified, this attribute is set to zero (0).


The maximum number of request processing threads to be created by this Connector, which therefore determines the maximum number of simultaneous requests that can be handled. If not specified, this attribute is set to 20.


The number of request processing threads that will be created when this Connector is first started. This attribute should be set to a value smaller than that set for maxProcessors. The default value is 5.


The TCP port number on which this Connector will create a server socket and await incoming connections. Your operating system will allow only one server application to listen to a particular port number on a particular IP address.


This attribute value must be org.apache.jk.server.JkCoyoteHandler to use the JK handler.


If set to true, the authetication will be done in Tomcat. Otherwise, the authenticated principal will be propagated from the native webaserver and used for authorization in Tomcat. The default value is true.


This specifies the character encoding used to decode the URI bytes, after %xx decoding the URL. If not specified, ISO-8859-1 will be used.


This specifies if the encoding specified in contentType should be used for URI query parameters, instead of using the URIEncoding. This setting is present for compatibility with Tomcat 4.1.27 and earlier. The default value is true.

Nested Components

Copyright © 1999-2009, Apache Software Foundation