Datasheet

Chapter 1
12
The Tomcat 4.x series, however, features a much nicer implementation of HTTP and better support for
serving up static content, and should by itself be sufficient for people who aren't looking to max out
performance but simply need HTTP standards compliance. However, as mentioned above, Apache will
most likely always have superior performance and options when it comes to serving up static content
and communicating with clients via HTTP, and, for this reason, anyone who is using Tomcat for high-
traffic web applications may want to consider using Apache and Tomcat together.
Apache Connectors
For interfacing with Apache, Tomcat 4.x supports two different types of connectors: AJP and WARP;
AJP and WARP refer to two different protocols that govern how the connector communicates with
Apache. The Apache JServ Protocol (AJP) dates back to the Apache JServ product that we mentioned
earlier in this chapter. The first connector to implement this protocol, called mod_jserv, was written
for the initial JServ product and continued to function with the Tomcat 3.x series. The newest AJP-
based connector is mod_jk2.
The WARP protocol was created for the Tomcat 4.x series, and mod_webapp is the name of the only
connector that currently implements this protocol. The WARP protocol is intended to provide greater
flexibility and greater performance than the AJP protocol.
Getting the Apache connectors to work properly can be tricky, and finding helpful documentation is
even trickier. However, Chapters 11-13 will help to clarify this sometimes murky subject.
Tomcat and Other Web Servers
The AJP protocol introduced above can also be used to integrate Tomcat with two other web servers:
Microsoft's Internet Information Services (IIS) and Netscape Enterprise Server (NES). This topic will be
covered in detail in Chapter 14.
If you're not using either Apache, IIS, or NES then don't give up hope entirely. It is still very possible to
integrate Tomcat with other web servers, even one that resides on the same machine. All one has to do is
set up Tomcat to run on a port other than 80 – the default HTTP port. Note that, by default, Tomcat runs
on port 8080. Thus, any normal web requests to a server will go to an HTTP server sitting on port 80, and
any requests to port 8080 will go to Tomcat. You can then design your web application's HTML to request
its static resources from the web server on port 80. For more information on this topic, see Chapter 5.