The Cymulacrum


Home Rants and Ruminations Writings Resume

Tomcat 4 on Linux Step-By-Step

Prepared by Pascal Chong

Last Updated: 14 March 2004, Created: 12 May 2003

Useful Links
Oscar Carrillo http://www.linuxjava.net/howto/webapp/
Michael Cardon http://www.cardon.biz/docs/tomcat/

Table of Contents
1. Revision History
2. Introduction
2.1. Why Am I Writing This ?
2.2. Copyright, License and Other Caveats
2.3. What is Tomcat ?
2.4. Why Should I Use It ?
2.5. Tomcat Versions
2.6. Tested Platforms
3. Installing Tomcat
3.1. Downloading The Software
3.2. Installing the Software
3.3. Starting and Stopping Tomcat
3.4. Running Tomcat as Non-Root User
4. Deploying Web Applications
4.1. Creating the HelloWorld Servlet
4.2. Deploying "HelloWorld"
4.2.1. Creating the directory structure
4.2.2. Adding a Context inside server.xml
4.2.3. Creating a web.xml file for the web application
4.2.4. Copying the servlets, JSPs and support files to their respective directories
4.3. Saying "HelloWorld"
4.4. Deploying Java Server Pages
5. Administering Tomcat
5.1. The Admin Web Application
5.2. The Manager Web Application
6. Customizing Tomcat
6.1. Disabling Directory Listing
6.2. Custom Default Pages
6.3. Custom Error Pages
7. Integrating with Apache
7.1. Getting the Apache-Tomcat Connectors
7.2. Using mod_jk2
7.2.1. Connector Configurations
7.2.2. About the FalseHope Apache 2 RPM
7.2.3. About mod_jk2
7.3. Integrating Using mod_jk2 and Channel Sockets
7.3.1. Install Tomcat and verify that it is working properly
7.3.2. Install Apache 2 and verify that it is working properly
7.3.3. Shutdown both Apache and Tomcat
7.3.4. Build mod_jk2 from source
7.3.5. Edit the configuration files, httpd2.conf, workers.properties, server.xml
7.3.6. Start Tomcat
7.3.7. Start Apache
7.3.8. Verify that everything works
7.4. Integrating Using mod_jk2 and UNIX Sockets
7.4.1. Install Tomcat and verify that it is working properly
7.4.2. Install Apache 2 and verify that it is working properly
7.4.3. Shutdown both Apache and Tomcat
7.4.4. Build mod_jk2 from source
7.4.5. Edit the configuration files, httpd2.conf, workers.properties, server.xml
7.4.6. Start Tomcat
7.4.7. Start Apache
7.4.8. Verify that everything works
8. Appendix A. Integrating Apache and Tomcat using mod_jk
8.1. Install Tomcat and verify that it is working properly
8.2. Install Apache and verify that it is working properly
8.3. Shutdown both Apache and Tomcat
8.4. Install the mod_jk rpm file
8.5. Edit the configuration files, httpd.conf, mod_jk.conf, workers.properties, server.xml
8.5.1. httpd.conf
8.5.2. mod_jk.conf
8.5.3. workers.properties
8.5.4. server.xml
8.6. Start Tomcat
8.7. Start Apache
8.8. Verify that everything works
9. References and Useful Links