Solve Tomcat startup exceptions and redundant information-Apache Portable Runtime and tomcat

Source: Internet
Author: User
Tags apache tomcat

Many times, the downloaded Tomcat will see redundant information similar to the following when it is started:

2007-12-15 21:39:21 org. Apache. Catalina. Core. aprlifecyclelistener lifecycleevent

Information: the Apache Tomcat native library which allows optimal performance in produ
Ction environments was not found on the java. Library. Path: D: jdk1.5.0 _ 06/bin ;.;
C: windowssystem32; C: Windows; D: jdk1.5.0 _ 06/bin; D: oracleora92/bin; C: Program
Filesoraclejre1.3.1/bin; C: Program filesoraclejre1.1.8/bin; C: windowssys
Tem32; C: Windows; C: windowssystem32wbem; C: Program filesmicrosoft SQL Server
80 toolsbinn

This occurs because Tomcat recommends Apache apr.
Solution:
Download the compiled http://tomcat.heanet.ie/native/ file to the tcnative-1.dll, the latest is 1.1.10, copy to JDK/bin or Tomcat bin directory, restart tomcat to load Apr.
The information is as follows:

2007-12-15 22:48:30 org. Apache. Coyote. http11.http11aprprotocol init
Information: initializing coyote HTTP/1.1 on http-8080
2007-12-15 22:48:30 org. Apache. Coyote. AJP. ajpaprprotocol init
Information: initializing coyote AJP/1.3 on ajp-8009
2007-12-15 22:48:30 org. Apache. Catalina. startup. Catalina Load
Information: initialization processed in 1063 MS
2007-12-15 22:48:30 org. Apache. Catalina. Core. standardservice start
Information: starting service Catalina
2007-12-15 22:48:30 org. Apache. Catalina. Core. standardengine start
Information: Starting Servlet Engine: Apache Tomcat/5.5.20
2007-12-15 22:48:30 org. Apache. Catalina. Core. standardhost start
.......................

For official information, refer:
Address: http://tomcat.apache.org/tomcat-5.5-doc/apr.html

Tomcat can use the Apache Portable Runtime to provide superior scalability, performance, and better integration with native server technologies. the Apache Portable Runtime is a highly portable library that is at the heart of Apache HTTP Server 2. x. APR has passed uses, including access to advanced Io functionality (such as sendfile, epoll and OpenSSL), OS level functionality (Random Number Generation, system status, etc ), and native process handling (shared memory, NT pipes and Unix sockets ).

These features allows making Tomcat a general purpose Webserver, will enable much better integration with other native web technologies, and overall make Java much more viable as a full fledged webserver platform rather than simply a backend focused technology.

It seems that Tomcat can use Apache Portable Runtime to provide better performance and improve the processing capability of Web static pages,
No longer need dedicated web servers to process static pages.
However, three local components must be installed for APR support.
APR support requires three main native components to be installed:
1. Apr Library
2. JNI wrappers for APR used by Tomcat (libtcnative)
3. OpenSSL Libraries
Solution: install, configure, and use Windows
1, first go to the http://tomcat.heanet.ie/native/ to download the compiled tcnative-1.dll file, you can also download tomcat-native.zip to compile your own
2. Modify Catalina. BAT and add
Set catalina_opts = "-djava. Library. Path =.../../APR/lib"
Because I put this DLL under the APR/lib directory at the same level as the Tomcat directory, the relative path is used. Or add the DLL to your system variable path, the simplest way should be to put the tcnative-1.dll file under the bin directory of Tomcat

For the relevant performance test results, see:
Http://www.javaworld.com.tw/jute/post/view? Bid = 9 & id = 139958 & sty = 3 & age = 0

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.