The HTTP/1.1 Connector component is a Connector implementation that supports the HTTP/1.1 protocol. It enables Catalina to function as a stand-alone web server, in addition to its ability to execute servlets and serve JSP pages. A particular instance of this component listens for connections on a configured TCP/IP port number on the server. One or more such connectors can be configured, each forwarding requests to a particular Container for processing.
This Connector is configured by including a
<Connector>
element in your conf/server.xml
configuration file, nested inside the <Server>
element.
All connectors that you have configured are automatically attached to the
first container that is specified after the connector (typically with an
<Engine>
element).
At server startup time, this Connector will create a number of processor
threads (based on the value of the minProcessors
property). Each
incoming request requires a thread, and the associated processor, for the
duration of that request. If more simultaneous requests are received than
can be handled by the current set of available processors, additional threads
(and associated processors) will be created up to the configured value of the
maxProcessors
property, which defines the maximum number of
simultaneous requests this connector is allowed to process.
The HTTP/1.1 Connector supports the following attributes, which are
defined in a <Connector>
element:
Attribute | Description |
---|---|
acceptCount |
The maximum queue length for incoming connection indications that will be allowed on our server socket. If a connection indication arrives when the queue is full, the connection is refused. If not specfied, a backlog of 10 will be allowed. |
address |
For servers with more than one IP address, this property specifies which address will be used for listening on the specified port. If not specified, this port number will be used on all IP addresses associated with this server. |
bufferSize |
The size (in bytes) of the buffer to be provided for input streams created by this connector. Increasing the buffer size can improve performance, at the expense of higher memory usage. If not specified, a buffer size of 2048 bytes will be provided. |
className |
Java class name of the implementation to use. Must be specified
as org.apache.tomcat.connector.http.HttpConnector
to use the standard implementation.
|
debug |
The debugging detail level of log messages generated by this connector, where higher numbers create more detailed output. If not specified, the debugging detail level will be set to zero (0). |
maxProcessors |
The maximum number of processor threads that will ever be created by this Connector, which therefore determines the maximum number of simultaneous requests that can be handled. If not specified, the maximum will be set to 20. |
minProcessors |
The number of processor threads that will be initialized when this Connector is first started. If not specified, 5 processors will be initialized. |
port |
The TCP/IP port number on which this connector should listen for client connections. Your operating system will allow only one server application to listen to a particular port at a particular time. If not specified, port 8080 will be used. |
This Connector supports all of the required features of the HTTP/1.1 protocol as described in RFC 2616, including persistent connections and chunked encoding. If the client (typically a browser) supports only HTTP/1.0, this Connector gracefully falls back to supporting this as well, so that interoperability is maximized. No special configuration is required to enable this support.
Any debugging or exception logging information generated by this Connector will be sent to the Logger associated with the Container which is used to process requests for this Connector.