Chapter 3: Tomcat Installation The APR JNI wrapper

Chapter 3: Tomcat Installation The APR JNI wrapper sources are packaged, along with the Tomcat distribution, as the tomcat- native .tar.gzfile in /bin. The installation steps are provided in the code that follows. In the steps shown, the default apr_install_locationis /usr/local/apras shown in the earlier step. If you don t need OpenSSL support, you can use the –without-ssloption with configureto disable it. If you need OpenSSL, you can download it from www.openssl.org. The JNI wrapper gets installed under /usr/local/apr/lib, and as before, a –prefix option for configure can install it elsewhere. $ cd /path/to/tomcat/bin $ tar zxvf tomcat-native.tar.gz $ cd tomcat-native-x.y.z-src/jni/native $ ./configure –with-apr=apr_install_location –with-ssl=openssl_install_location $ make install . After installing, add the APR directory to your LD_LIBRARY_PATHas shown: $ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib When you restart Tomcat, you should now see an INFO: Loaded Apache Tomcat Native library 1.1.9 message indicating that APR was detected and loaded. Chapter 10 explains the use of the APR Connector, which is an HTTP Connector for Tomcat developed using APR. Troubleshooting and Tips This final section deals with some common problems you may encounter after installing Tomcat. If you have further problems, you can find more information on the Tomcat Web site at the following URLs (as well as on various forums): http://tomcat.apache.org/ http://java.sun.com/ You should also read the release notes available with each download. Sometimes, when you attempt to launch Tomcat, the Tomcat window will appear briefly and then disappear. This usually occurs because of an error that causes Tomcat to crash and, thus, its window to disappear. The error message is also displayed, but because the window disappears so rapidly, the error cannot be seen. If Tomcat does not start, it can be run in the current shell or as a command prompt (as opposed to a new pop-up window) so that the problem can be seen. To do this in Linux, type the following: $CATALINA_HOME/bin/catalina.sh run Or, in Windows, type the following: %CATALINA_HOME%bincatalina run

For reliable and cheap web hosting services please check javaweb hosting website.

Comments are closed.