Mastering Tomcat: Installation, configuration, logging and optimization

To master the Apache Tomcat server, administrators and developers need to be familiar with installation, configuration, logging and performance optimization

There is no denying the fact that Tomcat is the most beloved application server amongst software professionals and application developers who are plying their trade in the server side universe. Not only is Tomcat the go-to test engine for coders who are looking to quickly test applications that might be deployed to a commercial server such as WebSphere or Weblogic, but it has also become the foundation for various open-source offerings such as the VMware vFabric tc Server. Whether it's being used purely as a test environment, or as a fully clustered production system, every developer working within the Java ecosystem must be familiar, to some extent, with this incredibly popular servlet engine from Apache.

Every developer working within the Java ecosystem must be familiar with this popular servlet engine.

Cameron McKenzie, Editor of TheServerSide

For those who are interested in honing up their skills with the latest version of the Tomcat server, TheServerSide has an excellent screencast tutorial that takes IT professionals of all stripes through the various steps required to download, deploy and test the installation of version 7:

Installing version 7 of the Apache Tomcat application server

Of course, there are a variety of different ways to configure Tomcat, and a common mistake system administrators make is using the same Tomcat settings on the server as they would with a default installation on a desktop machine. This set of tips from Lukas Stewart identifies they key elements of the settings.xml file that need to be tweaked to get the best performance out of a Tomcat installation running on a server.

The two most commonly mis-configured Tomcat installation settings

Once Tomcat is up and running, an administrator will want to make sure the environment is running as efficiently as possible. One quick change an administrator can safely make on their installation is to consolidate the various log file handlers so that fewer instances are running on the production machine. This second tip from Lukas Stewart demonstrates how to do just that:

Tomcat performance optimization through consolidated log file handlers

And finally, administrators will want to take a quick look at the following tutorial that demonstrates how to configure the Tomcat server to ensure that application developers don’t accidentally push applications into production that are optimized for development. Many frameworks, like JavaServer Faces and Spring, have tweaks that make development and debugging easier, but these settings can significantly degrade performance if they find their way into the production environment. The following tip demonstrates how the Tomcat server can be configured to ensure that resource depleting development settings never get deployed to a production machine:

How to permanently configure web application settings on the application server

The Tomcat server remains popular because if its simplicity and ease of use, and by using these tips and tutorials, system administrators and application developers who are using this popular Apache project will ensure that they are getting the most out of this beloved, open-source tool.

Do you have any good tips that will help administrators save time when configuring and optimizing the Tomcat application server? Let us know about your favorite tips and tricks.

Recommended Titles:

Tomcat: The Definitive Guide by Jason Brittain
Apache Tomcat 7 Essentials by Tanuj Khare
Java Performance by Charlie Hunt
Java Performance Tuning (2nd Edition) by Jack Shiraz
Java Performance and Scalability by Henry H. Liu

Next Steps

New to Git and distributed version control? Here are some Git examples and Jenkins-Git integration tutorials designed to help you master the popular source code versioning tool.

Dig Deeper on Software development techniques and Agile methodologies

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.