 |
Tomcat: The Definitive Guide, 2nd Edition
Read an excerpt:
Chapter 4: Tomcat Performance Tuning
Excerpt provided courtesy of O'Reilly Media. Copyright © O'Reilly Media, Inc. Written permission from the publisher is required for any use of this material.
|
Be the First to Write a Review and tell the world about this title!People who purchase this book frequently purchase: - JBoss Seam: Simplicity and Power Beyond Java EE; Michael Juntao Yuan, et al, $25.50, 36% Off!
- Agile Java Development with Spring, Hibernate and Eclipse; Anil Hemrajani, $24.50, 46% Off!
- RESTful Web Services; Leonard Richardson, et al, $24.95, 38% Off!
- Apache Cookbook, 2nd Edition; Rich Bowen, et al, $21.95, 37% Off!
Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:
It takes a book as versatile as its subject to cover Apache Tomcat, the popular
open source Servlet and JSP container and high performance web server. Tomcat:
The Definitive Guide is a valuable reference for administrators and webmasters,
a useful guide for programmers who want to use Tomcat as their web application
server during development or in production, and an excellent introduction for
anyone interested in Tomcat.
Updated for the latest version of Tomcat, this new edition offers a complete
guide to installing, configuring, maintaining and securing this servlet container.
In fact, with such a wealth of new information, this is essentially a new book
rather than a simple revision. You will find details for using Tomcat on all
major platforms, including Windows, Linux, OS X, Solaris, and FreeBSD, along
with specifics on Tomcat configuration files, and step-by-step advice for deploying
and running web applications.
This book offers complete information for:
- Installation and startup procedures
- Configuring Tomcat-including realms, roles, users, servlet sessions, and
JNDI resources including JDBC DataSources
- Deploying web applications-individual servlets and JSP pages, and web application
archive files
- Tuning Tomcat to measure and improve performance
- Integrating Tomcat with Apache Web Server
- Securing Tomcat to keep online thugs at bay
- Tomcat configuration files-server.xml and web.xml, and more
- Debugging and Troubleshooting-diagnosing problems with Tomcat or a web application
- Compiling your own Tomcat, rather than using the pre-built release
- Running two or more Tomcat servlet containers in parallel
This book also offers an overview of the Tomcat open source project's community
resources, including docs, mailing lists, and more. Community interest fueled
a strong demand for a Tomcat guide from O'Reilly. The result clearly exceeds
expectations.
Table of Contents
Preface
1. Getting Started with Tomcat
Installing Tomcat
Starting, Stopping, and Restarting Tomcat
Automatic Startup
Testing Your Tomcat Installation
Where Did Tomcat Come From?
2. Configuring Tomcat
A Word About Using the Apache Web Server
Relocating the Web Applications Directory
Changing the Port Number from 8080
Java VM Configuration
Changing the JSP Compiler
Managing Realms, Roles, and Users
Controlling Sessions
Accessing JNDI and JDBC Resources
Servlet Auto-Reloading
Customized User Directories
Tomcat Example Applications
Common Gateway Interface (CGI)
The Tomcat Admin Webapp
3. Deploying Servlet and JSP Web Applications in Tomcat
Layout of a Web Application
Deploying an Unpacked Webapp Directory
Deploying a WAR File
Hot Deployment
Working with WAR Files
The Manager Webapp
Automation with Apache Ant
Symbolic Links
4. Tomcat Performance Tuning
Measuring Web Server Performance
External Tuning
Internal Tuning
Capacity Planning
Additional Resources
5. Integration with the Apache Web Server
The Pros and Cons of Integration
Installing Apache httpd
Apache Integration with Tomcat
Tomcat Serving HTTP over the APR Connector
6. Tomcat Security
Securing the System
Multiple Server Security Models
Using the SecurityManager
Granting File Permissions
Setting Up a Tomcat chroot Jail
Filtering Bad User Input
Securing Tomcat with SSL
7. Configuration
server.xml
web.xml
tomcat-users.xml
catalina.policy
catalina.properties
context.xml
8. Debugging and Troubleshooting
Reading Logfiles
Hunting for Errors
URLs and the HTTP Conversation
Debugging with RequestDumperValve
When Tomcat Won't Shut Down
9. Building Tomcat from Source
Installing Apache Ant
Obtaining the Source
Downloading Support Libraries
Building Tomcat
10. Tomcat Clustering
Clustering Terms
The Communication Sequence of an HTTP Request
Distributed Java Servlet Containers
Tomcat 6 Clustering Implementation
JDBC Request Distribution and Failover
Additional Resources
11. Final Words
Supplemental Resources
Community
A. Installing Java
B. jbchroot.c
C. BadInputValve.java
D. BadInputFilter.java
E. RPM Package Files
Index
About the Authors
Jason Brittain is a Senior Software Engineer at Symantec Corporation's
Network and Gateway Security Solutions Team, working on the AntiSpam product.
Jason's specialties include Tomcat, dynamic web development, Java application
servers, scalability and fault tolerance, clustering, and Apache Ant build systems.
He has contributed to many Apache Jakarta projects, and has been an active open
source software developer for several years.
Ian F. Darwin has worked in the computer industry for three decades:
with Unix since 1980, Java since 1995, and OpenBSD since 1998. He wrote the
freeware file(1) command used on Linux and BSD and is the author of Checking
C Programs with Lint, Java Cookbook, and over seventy articles and several courses
(both university and commercial) on C and Unix. In addition to programming and
consulting, Ian teaches Unix, C, and Java for Learning Tree International, one
of the world's largest technical training companies. He runs BSD UNIX (OpenBSD
and/or OS X) on all of his computers; the only Windows he has are made of glass
and look out over the countryside north of Toronto.
|
 |