Integrating with Apache

Theoretically, you could deploy your application entirely on Tomcat. In fact, for low volume sites, this is entirely appropriate. For one of several reasons, however, you might want to layer Tomcat under Apache. These reasons are as follows:

  • To offload the mundane serving of static pages and images to the more efficient Apache server

  • Because you want to host sites under several virtual hostnames

  • Because you want to use SSL

Integrating Apache and Tomcat is fairly simple, if you follow the rules. First, you will need a copy of Apache for your architecture. If you're running Linux, you might already have it installed; otherwise, you can grab an RPM from one of the many sources on the Web (including www.apache.org) and install ...

Get MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.