Skip to main content

Professional Apache Tomcat 5

Professional Apache Tomcat 5

Vivek Chopra, Amit Bakore, Ben Galbraith, Sing Li, Chanoch Wiggers

ISBN: 978-0-764-57389-7

May 2004

624 pages

Select type: E-Book

Product not available for purchase


What is this book about?

The Apache Tomcat server and related technologies give Java developers a rich set of tools to quickly build more sophisticated Web applications. Tomcat version 5 supports the latest JSP and Servlet specifications, JSP 2.0, and Servlets 2.4. This completely updated volume offers you a thorough education in Tomcat 5 as well as 4.1.

What does this book cover?

You will learn to solve the problems that arise with installation and configuration, security, system testing, and more. This edition also introduces you to Tomcat clustering for planning and deploying installations in mission-critical production environments, and explores the new support for Tomcat in popular IDEs, such as IntelliJ IDEA, Eclipse, NetBeans/Sun Java Studio, and JBuilder.

You’ll discover how to manage class loaders and Connectors, understand how to use IIS as a Web server front-end for Tomcat, examine JDBC-related issues in Tomcat, and be ready to put this technology to work.

Here are some other things you'll learn from this book:

  • Techniques and troubleshooting tips for installing JVM and Tomcat on Windows and UNIX/Linux systems
  • Detailed Tomcat configuration, such as Access log administration, Single Sign-on across Web applications, request filtering, the Persistent Session Manager, and JavaMail session setup
  • How to resolve JDBC connectivity issues, including connection pooling, JNDI emulation, configuring a data source, and alternative JDBC configurations
  • How to use Web servers like Apache and IIS with Tomcat to serve static content
  • A wide range of security issues, from securing Tomcat installations to configuring security policies for Web applications that run on them
  • How to configure Tomcat for virtual hosting environments
  • Procedures for load-testing Web applications deployed in Tomcat using the open source JMeter framework
  • How to set up Tomcat clustering to provide scalability and high availability to Web applications
  • How to embed Tomcat within custom applications

Who is this book for?

This book is for J2EE system administrators and Java developers with responsibilities for Tomcat configuration, performance tuning, system security, or deployment architecture.



Chapter 1: Apache and Jakarta Tomcat.

Chapter 2: JSP and Servlets.

Chapter 3: Tomcat Installation.

Chapter 4: Tomcat Architecture.

Chapter 5: Basic Tomcat Configuration.

Chapter 6: Web Application Configuration.

Chapter 7: Web Application Administration.

Chapter 8: Advanced Tomcat Features.

Chapter 9: Class Loaders.

Chapter 10: HTTP Connectors.

Chapter 11: Web Server Connectors.

Chapter 12: Tomcat and Apache Server.

Chapter 13: Tomcat and IIS.

Chapter 14: JDBC Connectivity.

Chapter 15: Tomcat Security.

Chapter 16: Shared Tomcat Hosting.

Chapter 17: Server Load Testing.

Chapter 18: JMX Support.

Chapter 19: Tomcat 5 Clustering.

Chapter 20: Embedded Tomcat.

Appendix A: Log4J.

Appendix B: Tomcat and IDEs.

Appendix C: Apache Ant.


Download the code for the book in .zip format.
Code downloads for this title are available here.
Code Downloads
Code downloads for this title are available here.
Download the code for the book in .zip format.
Code downloads for this title are available here.
Code Downloads
Code downloads for this title are available here.
Download the code for the book in .rar format at less than 1/2 the size of the .zip.
Go to if your archive software doesn't support the .rar format.
ChapterPageDetailsDatePrint Run
Admin Web Application No Longer Budndled w/ Tomcat 5.5
The admin web application is not bundled along with Tomcat 5.5 anymore to enhance out-of-box security. Instead, users can download the admin application separately as

Tomcat 5.0 continues to bundle the admin application as of date.

339Errors in Text
In the first paragraph of the "Assigning Port Numbers" section (top of page), there are a few incorrect port assignments. The corrections are below:

POP3 uses port 110, not 25


SMTP uses port 25, not 110


The protocol for port 21 is SSH, not SSL.

561Nesting example beneath second paragraph
The nesting for the default configuration of Tomcat is incorrect.
It should be:

62First sentence under "The Server Component"
service.xml should read server.xml
under 'The Server Component' First sentence

124Error in Code
Under the welcome-file-list section, the source code reads:


However, it should read:


184Change in Path
In the "Adding a Resource Definition to the Application Context Descriptor" section, the path in parenthesis should be:


instead of the current:


307Unit wrong for parameter removeAbandonedTimeout
In server.xml, the unit of time in the parameter removeAbandonedTimeout is shown in minutes, it should be seconds.

308Error in Step 2
Step 2 (<resource-ref> entry in web.xml)not needed IF:
the JNDI resource is set as global.
Having the resource defined in the <DefaultContext> means that the <resource-ref> is not necessary in the web.xml file.

15350"CREATE TABLE user_roles" does not create dual primary
Code should read:
create table user_roles (
user_name varchar(15) not null,
role_name varchar(15) not null,
primary key (user_name, role_name)

13Chapter 13Error of Connector
Tomcat's JK2 Connector was deprecated after the book was released. The latest versions of Tomcat recommend using the JK connector. This Connector will be covered in detail in the next edition of this book ("Professional Apache Tomcat 6").