Tomcat Apr Mode Open method

Source: Internet
Author: User
Tags openssl library

Apr (Apache portable Runtime/apache Portable runtime) is the support library for Apache HTTP servers. You can simply understand that Tomcat will invoke the core dynamic link Library of the Apache HTTP server in the form of JNI to handle file reads or network transfer operations, thus greatly improving the performance of Tomcat's handling of static files. Tomcat APR is also the preferred mode for running high concurrent applications on Tomcat.

The configuration of Tomcat Apr run mode is relatively cumbersome. As stated in the official documentation, Tomcat APR requires support for the following three components:

1. APR LIBRARY[APR Library]

2. JNI wrappers for APR used by Tomcat (libtcnative) [Simply, if it is on the Windows operating system, it is a dynamic link library file called Tcnative-1.dll]

3. OpenSSL Libraries[openssl Library]


In addition, as with the NIO run mode, you need to change the Protocol property value of the corresponding connector node to Org.apache.coyote.http11.Http11AprProtocol. However, the above is only required in earlier versions of the configuration, the new version, if 9.0, the default is already Apr mode, it is recommended that users tomcat the latest version.

On Windows, the APR mode is dependent on the Tcnative-1.dll dynamic library, which is already included in version 9.0, and if it does not exist, it needs to download the configuration itself.

Basic steps:

1, download from http://archive.apache.org/dist/tomcat/tomcat-connectors/native/website;

2. Copy the Tcnative-1.dll of Tomcat to the bin directory;

3, start if the following content appears, the APR loaded successfully.

Tomcat Apr Mode Open method

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.