# Apache Tomcat 4

Links

- Docs Home
- Config Ref. Home

Top Level Elements

- Server
- Service

Current Connectors

- Overview
- Coyote HTTP/1.1
- Coyote JK
- JK
- mod_proxy_ajp

Deprecated Connectors

- Overview
- HTTP/1.1
- AJP/1.3
- Webapp
- JK2

Containers

- Context
- Engine
- Host

Nested Components

- Default Context
- Global Resources
- Loader
- Logger
- Manager
- Realm
- Resources
- Valve

# The AJP/1.3 Connector

print-friendly
version

Introduction

> IMPORTANT NOTE: The AJP/1.3 Connector is now deprecated. Use the Coyote JK Connector instead.

> The AJP/1.3 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.

Attributes

> Common Attributes

> > All implementations of Connector support the following attributes:

> > Attribute | Description
> > --- | ---
> > `className` | 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.
> > `enableLookups` | 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.
> > `redirectPort` | 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.
> > `scheme` | 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`".
> > `secure` | 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 JK/AJP Connector is org.apache.ajp.tomcat4.Ajp13Connector.

> > This implementation supports the JK 1.3 and 1.4 protocols (also known as AJP 1.3 and 1.4).

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

> > Attribute | Description
> > --- | ---
> > `acceptCount` | 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.
> > `address` | For servers with more than one IP address, this attribute specifies which address will be used for listening on the specified port. By default, this port will be used on all IP addresses associated with the server.
> > `debug` | 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).

> > `maxProcessors`

> > 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.

> > NOTE:For Apache 1.3 on Unix there is a 1 to 1 mapping between httpd processes and Ajp13Processors. You must configure maxProcessors to be greater than or equal to the maximum number of httpd processes your Apache web server spawns.

> > `minProcessors` | 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.
> > `port` | 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.

> > `tomcatAuthentication`

> > This flag, which value defaults to `true`, indicates whether or not authentication will be handled by Tomcat or the native web server. If the attribute value is `true`, any pricipal authenticated by the native web server will be ignored, and Tomcat will take care of the authentication. If the attribute value is `false`, Tomcat will not attempt to authenticate a principal if the native web server has already authenticated one.

Nested Components

Copyright © 1999-2005, Apache Software Foundation