About the Reviewer
Todd Runstein has over 15 years experience building distributed, data-centric software systems.  Currently working as a Senior Developer for eROI, a leading interactive agency in Portland, Oregon, he is developing an "online presence" platform.
Spotlight Features

The Rich Engineering Heritage Behind Dependency Injection

Andrew McVeigh takes us on a tour of the rich heritage behind dependency injection, what it represents, and tells us why its here to stay.

NetBeans 6: Matisse Updates

NetBeans 6 delivers great updates to the Matisse GUI builder. Spend a few minutes with Roman Strobl and get an expert briefing on what's new and what has changed.

Introduction to Groovy Part 3

In this, the third and final installation of Andres' Introduction to Groovy series, you learn about how Groovy handles variable numbers of arguments, named parameters, currying, and more about Groovy operators. Including, some new operators.

Easier Custom Components with Swing Fuse

Swing Fuse (actually just Fuse), is a framework designed to make it easier to create your own custom desktop components. In this article, Daniel Spiewak shows you how to get started and provides sample source code you can download.

Benchmark Analysis: Guice vs Spring

Willam Louth shows how he uses JXInsight Probes to investigate probable performance issues with code bases that he is not familiar with. He also highlights possible pitfalls in creating a benchmark, as well as in the analysis of results.

Tomcat - The Definitive Guide



Author(s) Jason Brittain with Ian F. Darwin
Publisher O'Reilly
PubDate 2007, 2nd Edition
Reviewer Todd Runstein
Purchase and help Javalobby






Table of Contents






One Minute Review

Positives
  • Sections are complete and easy to understand
  • Coverage of each area is usually sufficient; little need for the author to suggest you "search the web"
  • Differences between versions of Tomcat are well documented
  • The section on upgrading is especially useful and thorough
Negatives
  • This is for administrators, not developers
  • If you're hoping to learn how to write code that fully exploits Tomcat, this is not the book for you

Sections

Intent & Audience

Though the cover says "Vital Information for Tomcat Programmers & Administrators", it is the administrators who will get the most benefit. This book is well worth having for its advice on configuring, securing and clustering Tomcat instances. As for developers, however, this is really only for those developers who double as administrators. If you're looking for information on how to fully exploit Tomcat by writing custom realms, valves, and so forth, look elsewhere.

back to top Back to top

Relevance of material

For administrators who have Tomcat running in their environment, or developers who are responsible for their deployment environments, this book is very useful. The material is very complete and understandable. Some sections follow the authors' attempts to get certain configurations set up, illustrating difficulties and workarounds. This guide goes well beyond the online documentation for Tomcat.

back to top Back to top

Rating

This is a great guide for Tomcat administrators. It is not geared towards developers however, hence the rating for relevance. Had the cover not suggested that I might learn how to actually contribute to Tomcat (as a programmer), I would have given the book 5 stars in each category.

Relevance
Readability
Overall

back to top Back to top

Chapter highlights

Chapter 1:  Getting Started with Tomcat - This chapter covers installation, startup, shutdown and project history. I was very impressed with the number of operating systems included in this section, including Solaris and FreeBSD. As expected, there are certain "search the web" statements, but these are very appropriate and are not used to compensate for laziness on the authors' part.

Chapter 2:  Configuring Tomcat - This is a good introduction to various options for connecting to your Tomcat application. Planning on using Apache in front of Tomcat? Prefer to run Tomcat on its own, using port 80? Want to keep your Tomcat Manager inaccessible to the rest of the world? This chapter covers configuring Tomcat with other servers, the JVM, the JSP compiler used, and more. 

Chapter 3:  Deploying Servlet and Jsp Web Applications in Tomcat - Though some of the information in this chapter is an extension of Chapter 2, in general it is useful. The authors advocate deploying applications as an unpacked directory instead of using a WAR file. While their argument is sound, I was a bit put off by paragraphs repeated verbatim - I don't like seeing source code that is obviously copied and pasted; I don't like seeing paragraphs in documentation copied and pasted either.

Whether or not you decide to heed the authors advice, there is good coverage of deployment techniques. Manual deployment, Tomcat Manager, and Ant deployment are all covered. Each section includes enough information to help you decide which method is best for your application, as well as how to execute deployments.

Chapter 4:  Tomcat Performance Tuning - While performance tuning and testing is a huge area, this chapter goes beyond describing how to test Tomcat installations. The authors share their results from various tests. While your environment may perform differently, it was interesting to see that the tests performed while writing the book proves conventional wisdom is not always accurate.

Chapter 5:  Integration with the Apache Web Server - Since running Apache in front of Tomcat is such a popular configuration, the authors devote an entire chapter to setting up and configuring this arrangement. Despite its popularity and this attention, the authors discourage this setup, preferring instead to run Tomcat on it's own. However, recognizing that there are some legitimate reasons for using the servers in tandem (or just because "that's how we've always done it"), there is an in-depth explanation of how to connect the two.

Chapter 6:  Tomcat Security - Though this is a book on Tomcat, securing Tomcat alone does not provide a secure application. There is very good coverage of securing the operating system, including how to set up a chroot jail. Not only does this chapter explain various exploits, it also shows sample vulnerable code that you can experiment with, as well as fixes to shore it up. There is in-depth coverage of SSL and certificates as well.

Chapter 7:  Configuration - Despite the similarity in name to Chapter 2, this chapter digs deeply into the various configuration files within Tomcat. Rather than dealing with how Tomcat is integrated into your environment, the authors go through each argument in the configuration files used to modify Tomcat's behavior. This provides extremely comprehensive documentation for server.xml, web.xml and other important Tomcat files.

Chapter 8:  Debugging and Troubleshooting - Assuming that your applications are well behaved, what do you do to determine why things aren't working the way they should? This short chapter covers various options for inspecting communication between applications and browsers, as well as steps for diagnosing shutdown problems. This chapter is a bit brief, but without addressing potential coding errors in your application, troubleshooting options are limited.

Chapter 9:  Building Tomcat from Source - After arguing that most people will never need this chapter, the authors explain the steps required to obtain and build the Tomcat source. The chapter ends with the assertion that you "should have" a working copy of Tomcat after following their instructions, but there is no explanation of what to do if your copy doesn't work. Again, as this is required material for a book on Tomcat but should not be not required by most people actually using Tomcat, the sparse coverage of this chapter seems appropriate.

Chapter 10:  Tomcat Clustering - Beginning with the basics, enough information is presented to get a Tomcat cluster set up and running. While not an exhaustive review of clustering techniques, it is still more than sufficient for leading you through a basic cluster setup. The discussion is very clear and understandable and includes methods to test your configuration to ensure it is operating properly.

Chapter 11:  Final Words - Sources of information, including online and community resources, are presented. 

Appendix A-E:  The appendices covers useful information for administrators, such as installing a JVM, C code to create a chroot jail, and sample Java code alluded to in the rest of the book. There is also source code for generating a bundled RPM of Tomcat and a web application - perhaps not extremely useful to everyone, but interesting none the less.
 

back to top Back to top

Resources

Tomcat home page:  http://tomcat.apache.org

Books website: http://www.oreilly.com/catalog/9780596101060/