Java Tutorial - Java Script : Integrating Tomcat with Apache

Java Tutorial - Java Script :

Integrating Tomcat with Apache


So far, we have looked at configuring Tomcat as a standalone server. There are several reasons why we might want to configure Tomcat to work with a Web sever such as Apache. We have already discussed the restrictions under Linux on access to ports below 1024 and security concerns with running any server application as a root or administrative user. This issue is unique, however, to Linux and other Unix-based operating systems. There are other reasons to run Tomcat with a Web server. Often, a Web server will deliver static content faster than Tomcat can. If a site has a large amount of static content in proportion to its dynamic content, using a Web server to deliver the static content may result in better performance. This, of course, is specific to the application. However, it is not an uncommon occurrence when you think about the fact that HTML files, graphics, Cascading Style Sheets, JavaScripts, and applets are all usually served as static content. Most Web pages are built from many of these static
files that are combined. In this section, we will cover the basics of integrating Tomcat with the Apache Web server. The steps are similar for both Windows and Linux. We assume that Apache is already installed and configured as a service running on port 80. There are basically six steps to this process:
1. Download the connector binaries.
2. Copy the connector module to the Apache modules directory.
3. Edit the Apache configuration file.
4. Edit the Tomcat configuration file.
5. Create a workers.properties file.
6. Restart Tomcat and Apache.