ContentsPreviousNextTomcat-Book Project

Getting started
mod_jserv and mod_jk
Configuration Files
Troubleshooting, when it just doens't work

Integrating Tomcat with Apache Web Server means how to make these two programs work together as if they were one.

The main confusion comes up when most people start asking why do they have to set up an Apache Web Server if they already have Tomcat running, and as far as they know, Tomcat works also as stand alone and can also serve static context (HTML pages, images, etc ). And what's worse, they don't have to worry about dynamic context, because whenever they point to a servlet or JSP name in their URL, they automatically have it working and obtain the desired result.

But there's a problem they'll have to overcome when the site gets bigger and more complex. Serving static context wasn't the goal of Tomcat when the developers first decided to make it. And then the response and processing times will increase in a worring way.

In some other cases, there are a lot of companies that have been(and still do) running their web server with complex scripts, ie: CGI, perl, python and so forth, for a long time and they don't want to throw all of this legacy away because of its high cost. You will also find that:

  1. Tomcat is not as fast as Apache when it comes to static pages.
  2. Tomcat is not as configurable as Apache.
  3. Tomcat is not as robust as Apache.
  4. Tomcat may not address many sites' need for functionality found only in Apache modules (e.g. Perl, PHP, etc.).
  5. Tomcat has to run as root to use a privileged port (like 80). Apache just opens the port as root and spawns children under a different user id that process the requests.
  6. There are several modules around that only exist for apache (Like mod_gzip, mod_zlog)
  7. Tomcat does not support some CGI-Packages like FrontPage Server Extensions
  8. Tomcat access logging is not standard

As things are a little bit clearer now, it is not difficult to see that the most recommended way is to have Tomcat serving the dynamic content as an extension (add-on) to the companie's web server such as Apache, IIS, Netscape and so on that will keep serving the static pages.

ContentsPreviousNext