The AJP Connector
The AJP Connector element represents a
Connector component that communicates with a web
connector via the
AJP protocol. This is used for cases
where you wish to invisibly integrate JBoss Web into an existing (or new)
Apache installation, and you want Apache to handle the static content
contained in the web application, and/or utilize Apache's SSL
This connector supports load balancing when used in conjunction with
jvmRoute attribute of the
The native connectors supported with this JBoss Web release are:
- JK 1.2.x with any of the supported servers
- mod_proxy on Apache httpd 2.x (included by default in Apache HTTP Server 2.2), with AJP enabled: see the httpd docs for details.
Other native connectors supporting AJP may work, but are no longer supported.
All implementations of Connector support the following attributes:
A boolean value which can be used to enable or disable the TRACE HTTP method. If not specified, this attribute is set to false.
trueif you want calls to
request.getRemoteHost()to perform DNS lookups in order to return the actual host name of the remote client. Set to
falseto skip the DNS lookup and return the IP address in String form instead (thereby improving performance). By default, DNS lookups are enabled.
The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The feature can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).
The maximum size in bytes of the POST which will be saved/buffered by the container during FORM or CLIENT-CERT authentication. For both types of authentication, the POST will be saved/buffered before the user is authenticated. For CLIENT-CERT authentication, the POST is buffered for the duration of the SSL handshake and the buffer emptied when the request is processed. For FORM authentication the POST is saved whilst the user is re-directed to the login form and is retained until the user successfully authenticates or the session associated with the authentication request expires. The limit can be disabled by setting this attribute to -1. Setting the attribute to zero will disable the saving of POST data during authentication. If not specified, this attribute is set to 4096 (4 kilobytes).
This attribute value must be
AJP/1.3to use the AJP handler.
If this Connector is being used in a proxy configuration, configure this attribute to specify the server name to be returned for calls to
request.getServerName(). See Proxy Support for more information.
If this Connector is being used in a proxy configuration, configure this attribute to specify the server port to be returned for calls to
request.getServerPort(). See Proxy Support for more information.
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". See SSL Support for more information.
Set this attribute to
trueif you wish to have calls to
truefor requests received by this Connector (you would want this on an SSL Connector). The default value is
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.x, where the encoding specified in the contentType, or explicitely set using Request.setCharacterEncoding method was also used for the parameters from the URL. The default value is
Set this attribute to
trueto cause JBoss Web to use the ServerName passed by the native web server to determine the Host to send the request to. The default value is
Set this attribute to
trueto cause JBoss Web to advertise support for the Srevlet specification using the header recommended in the specification. The default value is
To use AJP, you must specify the protocol attribute (see above).
This implementation supports the AJP 1.3 protocol.
It supports the following additional attributes (in addition to the common attributes listed above):
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. A value of
127.0.0.1indicates that the Connector will only listen on the loopback interface.
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.
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 this Connector will wait, after accepting a connection, for the request URI line to be presented. The default value is infinite (i.e. no timeout).
A reference to the name in an Executor element. If this attribute is enabled, and the named executor exists, the connector will use the executor, and all the other thread attributes will be ignored.
The number of milliseconds this Connector will wait for another AJP request before closing the connection. The default value is to use the value that has been set for the connectionTimeout attribute.
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 200. If an executor is associated with this connector, this attribute is ignored as the connector will execute tasks using the executor rather than an internal thread pool.
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.
Only requests from workers with this secret keyword will be accepted. Not used by default.
If set to
true, the TCP_NO_DELAY option will be set on the server socket, which improves performance under most circumstances. This is set to
If set to
true, the authetication will be done in JBoss Web. Otherwise, the authenticated principal will be propagated from the native webaserver and used for authorization in JBoss Web. The default value is
None at this time.