The Apache Tomcat Native Library is an optional component for use with
Apache Tomcat that allows Tomcat to use certain native resources
for performance, compatibility, etc.

Specifically, the Apache Tomcat Native Library gives Tomcat access to
the Apache Portable Runtime (APR) library's network connection (socket)
implementation and random-number generator.
See the Apache Tomcat documentation for more information on how to
configure Tomcat to use the APR connector.

to create the includes and makefiles to be able to build tc-native.
Where:$HOME/APR is something like /usr/bin/apr-1-config or the path where apr is
installed.$JAVA_HOME is something /home/jfclere/JAVA/jdk1.5.0_09 path to a JDK
installation. Any JDK should work but it is advisable to use the same
JVM version the JVM you use with Tomcat.$HOME/OPENSSL is the path where OpenSSL is installed.$CATALINA_HOME is the path where the produced libraries will be
installed. Something like $HOME/apache-tomcat-6.0.16/

The configure is able to guess most of OpenSSL standard installations.
So most of the time the following will be enough:

Download OpenSSL sources (See Binary Distributions)
OpenSSL is a crypto software so check if you are allowed to download it. If not you can still use tc-native without SSL.

Download APR sources for Windows. (See Download)
Extract them in jni and rename the apr-1.x.y directory to apr.

Use MS Visual Studio to open the workspace of the APR sources and build the library (libapr).

Use MS Visual Studio to open the workspace of the tc-native sources, adjust the OpenSSL includes and libraries location
change the name of the libraries libeay32 and libssleay to libeay32MT and libssleayMT and build the tcn-native library.
That should create a tcnative-2.dll.

Apache Tomcat comes with the AprLifecycleListener enabled
by default. Still, you should check your conf/server.xml
to ensure that something like the following is present, and uncommented:

]]>

Please see the Apache Tomcat documentation for configuration specifics.

Edit $CATALINA_HOME/bin/setenv.sh (creating the file if necessary) and add
the path to the tc-native libraries to LD_LIBRARY_PATH. Something like: