Skip to content

Commit a3a6a89

Browse files
committed
Update documentation to reflect removal of APR connector
1 parent 5c1b14a commit a3a6a89

12 files changed

+57
-335
lines changed

BUILDING.txt

+12-12
Original file line numberDiff line numberDiff line change
@@ -326,29 +326,29 @@ directory:
326326

327327
output/build/logs
328328

329-
By default the testsuite is run three times to test 3 different
330-
implementations of Tomcat connectors: NIO, NIO2 and APR. (If you are not
331-
familiar with Tomcat connectors, see config/http.html in documentation for
332-
details).
329+
By default the testsuite is run twice to test the 2 different implementations
330+
of Tomcat connectors: NIO and NIO2. (If you are not familiar with Tomcat
331+
connectors, see config/http.html in documentation for details).
333332

334-
The 3 runs are enabled and disabled individually by the following
333+
The 2 runs are enabled and disabled individually by the following
335334
properties, which all are "true" by default:
336335

337336
execute.test.nio=true
338337
execute.test.nio2=true
339-
execute.test.apr=true
340338

341-
The APR connector can be tested only if Tomcat-Native library binaries are
342-
found by the testsuite. The "test.apr.loc" property specifies the directory
343-
where the library binaries are located.
339+
The SSL tests will be run twice. Once with the JSSE implementation and once
340+
with the OpenSSL implementation. The OpenSSL implementation can only can be
341+
tested if Tomcat-Native library binaries are found by the testsuite. The
342+
"test.apr.loc" property specifies the directory where the library binaries are
343+
located.
344344

345345
By default the "test.apr.loc" property specifies the following location:
346346

347347
output/build/bin/native/
348348

349-
If you are on Windows and want to test the APR connector you can put the
350-
tcnative-1.dll file into ${tomcat.source}/bin/native/ and it will be copied
351-
into the above directory when the build runs.
349+
If you are on Windows and want to test the OpenSSL TLS implementation you can
350+
put the tcnative-1.dll file into ${tomcat.source}/bin/native/ and it will be
351+
copied into the above directory when the build runs.
352352

353353
The unit tests include tests of the clustering functionality which require
354354
multicast to be enabled. There is a simple application provided in the Tomcat

RUNNING.txt

+4-8
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,9 @@ If you do use them, do not forget to read their documentation.
373373
Apache Tomcat Native library
374374
-----------------------------
375375

376-
It is a library that allows to use the "Apr" variant of HTTP and AJP
377-
protocol connectors in Apache Tomcat. It is built around OpenSSL and Apache
378-
Portable Runtime (APR) libraries. Those are the same libraries as used by
379-
Apache HTTPD Server project.
376+
It is a library that allows to use the OpenSSL variant of the TLS implementation
377+
for the HTTP connector in Apache Tomcat. It is built around OpenSSL and Apache
378+
Portable Runtime (APR) libraries.
380379

381380
This feature was especially important in the old days when Java performance
382381
was poor. It is less important nowadays, but it is still used and respected
@@ -390,13 +389,10 @@ For further reading:
390389

391390
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/apr.html
392391

393-
* Documentation for the HTTP and AJP protocol connectors in the Tomcat
394-
Configuration Reference
392+
* Documentation for the HTTP connector in the Tomcat Configuration Reference
395393

396394
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/config/http.html
397395

398-
https://tomcat.apache.org/tomcat-@VERSION_MAJOR_MINOR@-doc/config/ajp.html
399-
400396
- Apache Tomcat Native project home
401397

402398
https://tomcat.apache.org/native-doc/

TOMCAT-NEXT.txt

+4
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ Deferred until 10.1.x:
3333
the JRE with project Panama.
3434

3535
2. Review code forked from Commons projects and consider removing unused code.
36+
37+
3. Implement OCSP checks for client certs with NIO/NIO2.
38+
Useful reference:
39+
https://stackoverflow.com/questions/5161504/ocsp-revocation-on-client-certificate

build.properties.default

-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ execute.validate=false
4444
execute.download=true
4545
execute.test.nio=true
4646
execute.test.nio2=true
47-
# Still requires APR/native library to be present
48-
execute.test.apr=true
4947
# Stop testing if a failure occurs
5048
test.haltonfailure=false
5149
# Activate AccessLog during testing

conf/server.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,7 @@
7878
<!-- Define an SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
7979
This connector uses the NIO implementation. The default
8080
SSLImplementation will depend on the presence of the APR/native
81-
library and the useOpenSSL attribute of the
82-
AprLifecycleListener.
81+
library and the useOpenSSL attribute of the AprLifecycleListener.
8382
Either JSSE or OpenSSL style configuration may be used regardless of
8483
the SSLImplementation selected. JSSE style configuration is used below.
8584
-->

res/tomcat.nsi

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Var ServiceInstallLog
146146
LangString DESC_SecTomcat ${LANG_ENGLISH} "Install the Tomcat Servlet container as a Windows service."
147147
LangString DESC_SecTomcatCore ${LANG_ENGLISH} "Install the Tomcat Servlet container core and create the Windows service."
148148
LangString DESC_SecTomcatService ${LANG_ENGLISH} "Automatically start the Tomcat service when the computer is started."
149-
LangString DESC_SecTomcatNative ${LANG_ENGLISH} "Install APR based Tomcat native .dll for better performance and scalability in production environments."
149+
LangString DESC_SecTomcatNative ${LANG_ENGLISH} "Install APR based Tomcat native .dll to enable the OpenSSL based TLS implementation for HTTP connectors."
150150
LangString DESC_SecMenu ${LANG_ENGLISH} "Create a Start Menu program group for Tomcat."
151151
LangString DESC_SecDocs ${LANG_ENGLISH} "Install the Tomcat documentation bundle. This includes documentation on the servlet container and its configuration options, on the Jasper JSP page compiler, as well as on the native webserver connectors."
152152
LangString DESC_SecManager ${LANG_ENGLISH} "Install the Tomcat Manager administrative web application."

test/org/apache/coyote/http2/TestHttp2Limits.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,9 @@ private void doTestHeaderLimits(int headerCount, int headerSize, int maxHeaderPa
291291
String limitMessage = sm.getString("http2Parser.headerLimitSize", "\\d++", "3");
292292
limitMessage = limitMessage.replace("[", "\\[").replace("]", "\\]");
293293
// Connection reset. Connection ID will vary so use a pattern
294-
// On some platform / Connector combinations (e.g. Windows / APR),
295-
// the TCP connection close will be processed before the client gets
296-
// a chance to read the connection close frame which will trigger an
294+
// On some platform / Connector combinations the TCP connection close
295+
// will be processed before the client gets a chance to read the
296+
// connection close frame which will trigger an
297297
// IOException when we try to read the frame.
298298
// Note: Some platforms will allow the read if if the write fails
299299
// above.

webapps/docs/apr.xml

+2-57
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,7 @@
3737

3838
<p>
3939
Tomcat can use the <a href="https://apr.apache.org/">Apache Portable Runtime</a> to
40-
provide superior scalability, performance, and better integration with native server
41-
technologies. The Apache Portable Runtime is a highly portable library that is at
42-
the heart of Apache HTTP Server 2.x. APR has many uses, including access to advanced IO
43-
functionality (such as sendfile, epoll and OpenSSL), OS level functionality (random number
44-
generation, system status, etc), and native process handling (shared memory, NT
45-
pipes and Unix sockets).
40+
provide an OpenSSL based TLS implementation for the HTTP connectors.
4641
</p>
4742

4843
<p>
@@ -111,65 +106,15 @@
111106

112107
<p>
113108
Once the libraries are properly installed and available to Java (if loading fails, the library path
114-
will be displayed), the Tomcat connectors will automatically use APR. Configuration of the connectors
115-
is similar to the regular connectors, but have a few extra attributes which are used to configure
116-
APR components. Note that the defaults should be well tuned for most use cases, and additional
117-
tweaking shouldn't be required.
109+
will be displayed), the Tomcat connectors will automatically use APR.
118110
</p>
119111

120-
<p>
121-
When APR is enabled, the following features are also enabled in Tomcat:
122-
</p>
123-
<ul>
124-
<li>Secure session ID generation by default on all platforms (platforms other than Linux required
125-
random number generation using a configured entropy)</li>
126-
<li>OS level statistics on memory usage and CPU usage by the Tomcat process are displayed by
127-
the status servlet</li>
128-
</ul>
129-
130112
</section>
131113

132114
<section name="APR Lifecycle Listener Configuration">
133115
<p>See <a href="config/listeners.html#APR_Lifecycle_Listener_-_org.apache.catalina.core.AprLifecycleListener">the
134116
listener configuration</a>.</p>
135117
</section>
136118

137-
<section name="APR Connectors Configuration">
138-
139-
<p><strong>Note: The APR/Native AJP and HTTP Connectors are deprecated and
140-
will be removed in Tomcat 10.1.x onwards.</strong></p>
141-
142-
<subsection name="HTTP/HTTPS">
143-
144-
<p>For HTTP configuration, see the <a href="config/http.html">HTTP</a>
145-
connector configuration documentation.</p>
146-
147-
<p>For HTTPS configuration, see the
148-
<a href="config/http.html#SSL_Support">HTTPS</a> connector configuration
149-
documentation.</p>
150-
151-
<p>An example SSL Connector declaration is:</p>
152-
<source><![CDATA[ <Connector port="443"
153-
protocol="org.apache.coyote.http11.Http11AprProtocol"
154-
SSLEnabled="true" scheme="https" secure="true"
155-
socket.directBuffer="true" socket.directSslBuffer="true">
156-
<SSLHostConfig protocols="TLSv1.3">
157-
<Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
158-
type="RSA" />
159-
</SSLHostConfig>
160-
</Connector>]]></source>
161-
162-
163-
</subsection>
164-
165-
<subsection name="AJP">
166-
167-
<p>For AJP configuration, see the <a href="config/ajp.html">AJP</a>
168-
connector configuration documentation.</p>
169-
170-
</subsection>
171-
172-
</section>
173-
174119
</body>
175120
</document>

webapps/docs/config/ajp.xml

+4-55
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636

3737
<section name="Introduction">
3838

39-
<p><strong>Note: The APR/Native AJP Connector is deprecated and will be
40-
removed in Tomcat 10.1.x onwards.</strong></p>
41-
4239
<p>The <strong>AJP Connector</strong> element represents a
4340
<strong>Connector</strong> component that communicates with a web
4441
connector via the <code>AJP</code> protocol. This is used for cases
@@ -202,8 +199,6 @@
202199
- non blocking Java NIO connector.<br/>
203200
<code>org.apache.coyote.ajp.AjpNio2Protocol</code>
204201
- non blocking Java NIO2 connector.<br/>
205-
<code>org.apache.coyote.ajp.AjpAprProtocol</code>
206-
- the APR/native connector (deprecated - will be removed in 10.1.x).<br/>
207202
Custom implementations may also be used.<br/>
208203
Take a look at our <a href="#Connector_Comparison">Connector
209204
Comparison</a> chart.
@@ -288,9 +283,8 @@
288283

289284
<p>To use AJP, you must specify the protocol attribute (see above).</p>
290285

291-
<p>The standard AJP connectors (NIO, NIO2 and APR/native) all support the
292-
following attributes in addition to the common Connector attributes listed
293-
above.</p>
286+
<p>The standard AJP connectors (NIO and NIO2) both support the following
287+
attributes in addition to the common Connector attributes listed above.</p>
294288

295289
<attributes>
296290

@@ -325,11 +319,7 @@
325319
default, the connector will listen on the loopback address. Unless the JVM
326320
is configured otherwise using system properties, the Java based connectors
327321
(NIO, NIO2) will listen on both IPv4 and IPv6 addresses when configured
328-
with either <code>0.0.0.0</code> or <code>::</code>. The APR/native
329-
connector will only listen on IPv4 addresses if configured with
330-
<code>0.0.0.0</code> and will listen on IPv6 addresses (and optionally
331-
IPv4 addresses depending on the setting of <strong>ipv6v6only</strong>) if
332-
configured with <code>::</code>.</p>
322+
with either <code>0.0.0.0</code> or <code>::</code>.</p>
333323
</attribute>
334324

335325
<attribute name="allowedRequestAttributesPattern" required="false">
@@ -371,10 +361,7 @@
371361
<p>When client certificate information is presented in a form other than
372362
instances of <code>java.security.cert.X509Certificate</code> it needs to
373363
be converted before it can be used and this property controls which JSSE
374-
provider is used to perform the conversion. For example it is used with
375-
the AJP connectors, the <a href="http.html">HTTP APR connector</a> and
376-
with the <a href="valve.html#SSL_Authenticator_Valve">
377-
org.apache.catalina.valves.SSLValve</a>.If not specified, the default
364+
provider is used to perform the conversion. If not specified, the default
378365
provider will be used.</p>
379366
</attribute>
380367

@@ -771,34 +758,6 @@
771758
</attributes>
772759
</subsection>
773760

774-
<subsection name="APR/native specific configuration">
775-
776-
<p><strong>Note: The APR/Native AJP Connector is deprecated and will be
777-
removed in Tomcat 10.1.x onwards.</strong></p>
778-
779-
<p>The APR/native implementation supports the following attributes in
780-
addition to the common Connector and AJP attributes listed above.</p>
781-
782-
<attributes>
783-
<attribute name="ipv6v6only" required="false">
784-
<p>If listening on an IPv6 address on a dual stack system, should the
785-
connector only listen on the IPv6 address? If not specified the default
786-
is <code>false</code> and the connector will listen on the IPv6 address
787-
and the equivalent IPv4 address if present.</p>
788-
</attribute>
789-
790-
<attribute name="pollTime" required="false">
791-
<p>Duration of a poll call in microseconds. Lowering this value will
792-
slightly decrease latency of connections being kept alive in some cases
793-
, but will use more CPU as more poll calls are being made. The default
794-
value is 2000 (2ms).
795-
</p>
796-
</attribute>
797-
798-
</attributes>
799-
800-
</subsection>
801-
802761
</section>
803762

804763

@@ -836,61 +795,51 @@
836795
<th />
837796
<th style="text-align: center;">Java Nio Connector<br />NIO</th>
838797
<th style="text-align: center;">Java Nio2 Connector<br />NIO2</th>
839-
<th style="text-align: center;">APR/native Connector<br />APR<br />(deprecated)</th>
840798
</tr>
841799
<tr>
842800
<th>Classname</th>
843801
<td><code class="noHighlight">AjpNioProtocol</code></td>
844802
<td><code class="noHighlight">AjpNio2Protocol</code></td>
845-
<td><code class="noHighlight">AjpAprProtocol</code></td>
846803
</tr>
847804
<tr>
848805
<th>Tomcat Version</th>
849806
<td>7.x onwards</td>
850807
<td>8.x onwards</td>
851-
<td>5.5.x onwards</td>
852808
</tr>
853809
<tr>
854810
<th>Support Polling</th>
855811
<td>YES</td>
856812
<td>YES</td>
857-
<td>YES</td>
858813
</tr>
859814
<tr>
860815
<th>Polling Size</th>
861816
<td><code class="noHighlight">maxConnections</code></td>
862817
<td><code class="noHighlight">maxConnections</code></td>
863-
<td><code class="noHighlight">maxConnections</code></td>
864818
</tr>
865819
<tr>
866820
<th>Read Request Headers</th>
867821
<td>Blocking</td>
868822
<td>Blocking</td>
869-
<td>Blocking</td>
870823
</tr>
871824
<tr>
872825
<th>Read Request Body</th>
873826
<td>Blocking</td>
874827
<td>Blocking</td>
875-
<td>Blocking</td>
876828
</tr>
877829
<tr>
878830
<th>Write Response Headers and Body</th>
879831
<td>Blocking</td>
880832
<td>Blocking</td>
881-
<td>Blocking</td>
882833
</tr>
883834
<tr>
884835
<th>Wait for next Request</th>
885836
<td>Non Blocking</td>
886837
<td>Non Blocking</td>
887-
<td>Non Blocking</td>
888838
</tr>
889839
<tr>
890840
<th>Max Connections</th>
891841
<td><code class="noHighlight">maxConnections</code></td>
892842
<td><code class="noHighlight">maxConnections</code></td>
893-
<td><code class="noHighlight">maxConnections</code></td>
894843
</tr>
895844
</table>
896845

0 commit comments

Comments
 (0)