Apache Tomcat Administration Training Course

Course Summary

Our Apache Tomcat Administration Training Course covers the details of installing and configuring for the Tomcat Web Server.

Students will learn the details of the server.xml configuration file, an overview of Servlet and JavaServer Pages, a comparison of Tomcat to J2EE application servers, the Tomcat installation directories, deploying Java Web applications, the web.xml file, valves, logging, security realms, connecting Tomcat to Apache Web Server, hosting multiple Web sites, performance and scalability issues, load testing, clustering, monitoring, the Tomcat Manager, and the Tomcat Administration tool.


Duration [top]

3 days.

Objectives [top]

Upon completion of the Tomcat Training course, you will be able to:

  • Explain how Tomcat relates to Java EE (J2EE) and compares to other application servers (e.g. JBoss)
  • Install and setup Tomcat on both Windows and UNIX-type environments
  • Deploy, support, and troubleshoot applications on Tomcat
  • Navigate Tomcat's directory structure
  • Understand Tomcat architecture and configuration files: server.xml, context.xml, .properties, etc.
  • Understand web application structure and configuration: web.xml
  • Secure Tomcat and applications running on it
  • Set up Tomcat for SSL
  • Tune Tomcat's performance
  • Explore different load-balancing and high-availability strategies with Tomcat, including server affinity through sticky sessions as well as session replication via Tomcat Clustering

Audience [top]

CompleteWeb/application server administrators who need to be able to install, configure, run, and tune the Apache Tomcat Application Server.

Prerequisites [top]

To benefit most from this course, you should be familiar with the basic principles of web/application server administration as well as the operating system that you choose to use (Linux, Windows, MacOS X, Solaris). Please note that since Tomcat is largely OS-independent you can use an OS that you are more familiar with (e.g. Windows) during the training even if you eventually plan on depoying to another OS (e.g Linux). At our classroom in San Francisco, we provide a choice of Windows 7, Ubutnu 10.04, and CentOS 5.5 (equivalent to RHEL 5.5).

Additionally, prior exposure to any of these concepts can be helpful:

  • Basic rules of XML (i.e., being able to edit XML files)
  • HTTP protocol (i.e., the stateless nature of HTTP, the need for sessions, HTTP methods, SSL, etc.)
  • Java environments (e.g., memory settings, automatic garbage collection, JDBC)
  • Other Java EE (J2EE) application servers and basic concepts behind Java Web Applications

Please note that all of these concepts are covered in the class.

Instructors [top]


Adam Breindel brings over 10 years of successes working with cutting-edge technology for small startups as well as major players in the travel, media/entertainment, financial, productivity, and consulting industries.

In addition to web sites, GUI applications, and mobile device software, Adam has also built high-volume middleware for one of the world's largest banks, and produced a new, modern integration to a 1960s-vintage mainframe app for one of the world's largest airlines.

Adam focuses on designing and coding systems in a way that yields predictable results, leverages best practices and high-productivity tools, minimizes excess code, and is fun to do. He has also spoken at tech conferences, written articles and skill assessments, and produced an open source tool for software development. Adam has enjoyed teaching large and small groups, covering topics from nuts-and-bolts Java programming to merging ideal process with real-world constraints in an organization.

More about Adam Breindel...

Gordon Force leads NewCircle as CEO, and brings 25 years of experience as a developer, architect, director and instructor.

Gordon has taught over 50 training courses on technologies like Java, JBoss, JavaEE, Apache, and Spring and Hibernate.

Previously, Gordon led development and application support for ConnectPay and Encompass products at First Data Corporation. He is also a Certified Scrum Master, and holds a B.A. in Business Administration with Area of Concentration in Quantitative Economics.

More about Gordon Force...

Outline [top]

The time-estimates in this outline are just that - estimates. The actual time dedicated to each section depends on the background and objectives of the students.

Intro to JavaEE (15-45 mins)

  • Overview
  • Relationship to Tomcat
  • Standards vs implementation
  • Servlets/JSPs
    • Overview
    • Life-cycle
    • Advantages
    • Role of the application server (i.e. servlet container)
    • Comparison to other web technologies
  • Model-view-controller (MVC) design pattern
    • Quick overview
    • Impact on application design and troubleshooting

Apache Tomcat Overview (15-45 mins)

  • Background of Tomcat
  • Apache Software Foundation
  • Tomcat project
  • Tomcat licensing
  • Uses of Tomcat in the real world
  • Versions of Tomcat
  • Future direction for Tomcat
  • Alternative distributions of Tomcat

Installing Apache Tomcat (~ 60 mins)

  • Installing Java
    • Getting Java
    • Java SE vs. Java EE
    • JDK vs. JRE
    • Installing on Unix/Linux/Windows
  • Getting Tomcat
    • Pre-built binary release
    • Using vendor-supplied pre-compiled release
    • What do download?
  • Life-cycle management
    • Which scripts to run?
    • Running in background vs. foreground
    • Understanding the shutdown process
  • Running Tomcat as a system service
    • Installing Tomcat as a NT sevice on Windows
    • Running Tomcat with jsvc on Unix/Linux
    • Using SysV framework to manage auto-start/shutdown

Tomcat Directory Structure (45-60 mins)

  • The bin/ directory
  • The lib/ directory (libraries on Tomcat pre-v6: shared/, common/, server/)
  • Class loading on Tomcat
  • The conf/ directory
  • The context directories
  • The webapps/ directory
  • The temp/ directory
  • The logs/ directory
  • The work/ directory
  • Running multiple Tomcat instances off the single installation

Tomcat Architecture and Configuration (90-120 mins)

  • Tomcat architecture: the big-picture
  • Overview of XML
  • Overview of Tomcat conf/server.xml file
  • Walk through the Tomcat component hierarchy
    • The <Server> element
      • Configuring the shutdown port
    • The <Service> element
    • The <Connector> element
      • Overview of connectors
      • Configuration
      • Tuning
    • The <Executor> element
      • Understanding thread pooling
    • The <Engine> element
      • Overview
      • Understanding background threads
    • The <Host> element
      • Overview
      • Configuration
      • Virtual hosting on Tomcat
        • The <Alias> element
    • The <Context> element
      • Overview
      • Configuration
    • The <Valve> element (more on this later)
    • The <Realm> element (more on this later)
    • The <Loader> element
      • Overview
    • The <Manager> element (more on this later)
    • The <Resource> element (more on this later)
    • The <Listener> element
      • Overview
      • Extending Tomcat
    • The <Cluster> element (more on this later)

Logging on Tomcat (30 mins)

  • Defaut system logging
  • Using Log4J
  • Access Log Valve
  • Request Dumper Valve

Deployments and Web Apps on Tomcat (~ 90 mins)

  • Directory structure of web apps
    • Class-loading revisited
  • The WEB-INF/web.xml deployment descriptor
    • Common elements
    • Defining and mapping Servlets and Filters
    • Initializing web apps
    • Session configuration
    • Welcome file list
    • Error pages
    • Resources
    • JNDI entries
  • Web Archives (i.e. .war files)
    • Overview
    • Creating
    • Deploying
    • Pros/cons
  • Tomcat's conf/web.xml file
    • Static file handling
      • Performance implications
    • JSP handling
      • Overview
      • Memory/performance implications
      • Tuning
      • Pre-compiling JSPs
    • Default MIME-types
    • Default session config
    • Default welcome file list

Monitoring and Management on Tomcat (90-120 mins)

  • Tomcat Manager application
    • Overview
    • Accessing
    • Features
    • Starting and stopping applications
    • Deployments and undeployments
    • Automation with non-HTML mode
      • Using wget (i.e. command-line)
      • Ant Integration
    • Monitoring
  • Java Management Extensions (JMX) on Tomcat
    • Overview
    • Architecture
    • Tomcat MBeans
    • JMX Proxy Servlet
    • Run-time monitoring and management of the entire server
    • Automation with Ant
    • JConsole
      • Overview
      • Connecting to Tomcat
      • JVM Monitoring
      • MBeans support

Managing Resources on Tomcat (60-90 mins)

  • Overview of JNDI
  • Resources and JNDI on Tomcat
    • The <Environment> Element
    • The <Resource> Element
    • The <ResourceLink> Element
    • Global vs. local resources
    • The role of deployment descriptors
  • JavaMail on Tomcat
    • Overview
    • Adding support to Tomcat
    • Configuring JavaMail as a Tomcat resource
  • Database Integration on Tomcat
    • Overview of JDBC: API vs. drivers
    • Overview of Database Connection Pools (DBCP)
    • Configuring DBCP resources on Tomcat with MySQL
    • Handling connection pool leaks

Tomcat Security (90-120 mins)

  • Security of Tomcat
    • The shutdown command
    • Running on privileged ports
      • jsvc
      • TCP Port Relaying
    • User and directory permissions
    • Running with the Security Manager
      • Overview
      • Java Permissions and grants
      • Tomcat's policy file
      • Customizing policies
      • Pros and cons of the security manager
  • Securing applications running on Tomcat
    • Using valves for access control
      • Address vs Host valve
    • Authentication and Authorization
      • Overview of container-managed security
      • When to use?
      • A look at Manager app secrity
      • Requiring authorized users
      • Authentication options
      • Basic vs. form authentication
      • Realms
        • Overview
        • Types of realms
        • Using DataSource realm
        • Overview of JNDI realm
        • Protecting privacy of passwords
        • Combining realms
        • Lock-out realms
  • SSL/TLS on Tomcat
    • Overview
    • SSL Certificates
    • Configuring SSL connector
    • Requiring the use of SSL in applications

Tomcat Performance Tuning (15-60 minutes)

  • Java/JVM tuning
    • Heap sizing
    • Garbage collection policies
    • HotSpot JIT compilers
    • Scaling
    • Approaches
  • Tomcat tuning
    • Connectors
    • JSPs
    • Sessions
    • Scaling

High Availability (HA) and Scalability of Tomcat (90-120 mins)

  • Fronting Tomcat with Apache
    • Overview
    • Pros/cons
    • AJP vs. HTTP
    • mod_jk vs. mod_proxy_ajp
    • Using mod_jk
      • Compiling/Installing
      • Configuring
      • Monitoring
  • Load Balancing
    • Benefits and issues
    • Server-affinity (sticky sessions)
      • Pros/cons
    • Sharing sessions via persistent manager
      • Pros/cons
    • Session-replication
      • Clustering on Tomcat
      • Architecture
      • Configuration
      • Monitoring
      • Pros/cons
      • Massive-scaling with cluster groups

Load Testing with JMeter - Appendix (15-45 mins)

  • Overview of JMeter
  • Installation
  • Running
  • Creating a Test Plan
  • Configuring Thread Groups
  • Adding Tasks to Thread Groups
  • Configuring HTTP Requester
  • Managing Report Listeners
  • Running Test Plans

Additional Notes [top]

About the Platform

NewCircle Tomcat Training course can be taught on both Windows and UNIX/Linux-type environments. The instructor covers both options during the training.

NewCircle.com Runs on Tomcat

NewCircle.com is written in Java using Spring and Hibernate frameworks. We deploy it on Apache Tomcat Application Server. Both NewCircle Spark and Apache Tomcat are Java applications and thus run on Java Virtual Machine. Spark uses MySQL database for persistence. Our operating system of choice is Ubuntu Linux, for security and reliability reasons. So we practice what we teach. You will learn from real developers.


Apache™ and Tomcat™ are a trademark of The Apache Software Foundation. All other marks are the properties of their respective owners.

Student Testimonials [top]

Sasa was an excellent instructor and very patient with our many work related interruptions!

Brett - SkillSoft

Very knowledgeable instructor

Chidi - Hotels.com

Very knowledgable, even about the tangents.

Chris - Pearson

Great instructor very knowledgable, great course for beginners. Aleksandar was great, well-rounded instructor, has expertise in the Tomcat and Java. This is definitely one of the best technical training course I have taken! I'd recommend this class to other Systems Admin who wants to learn more on Tomcat!

Steven - Autodesk

Sasa is a well informed instructor with the ideal set on figuring out things for yourself and if you really get stuck he can easily help you out in more detail.

David - Agriculture Financial Services Corporation

Good Course. Met my expectations for the course. Sasa was very familar with the material and good instructor.

Aaron - Robert W Baird & Co

The course content was very useful. The material was very well structured and presentation was excellent. The instructor was very knowledgeable. Overall, this is probably the best course I have taken.

Ahmed - Research in Motion

Enjoyed the course greatly. Received some new thoughts on what I can do to better implement Tomcat.
Sasa is really smart and experienced. Leaned a lot from him. Laurent is a very nice guy and has a lot of potentials.

Robert - Newegg Inc.

Alexandar was great and provide us great lengths of detail. Can't wait to try TomCat with real data!

Renato - Williams-Sonoma, Inc.

This training is great. Learned much from it.

Garry - Newegg Inc.

The breath and depth of the instructor's experience and knowlege was phenominal. The course was a great experience.

Darren - Research in Motion

Keep going with the charts and drawing! It very helpful! The course was very clear and interesting, adapted to both developers and administrators. The charts and drawings made a significant difference.

Laurent - Marakana, Inc.

Sasa was an excellent teacher.

Maria - Whitehead Institute for Biomedical Research

Highly recommend! Very good training course and company!

Aniu - Newegg Inc.

This was a very thorough class. I learned much more than I ever expected. Sasa knew the material inside and out and was able to answer all questions completely. The diagram of the server layout alone was worth whatever the class cost is.

Andrew - Shopko Stores Operating Co. LLC

Thanks! Great class! I learned a lot and look forward to using what I learned next week.

Anthony - Pearson

This course is a wealth of information. This class is like participating in a Vulcan mind meld. It is a wealth of information that you can take with you. Highly recommended!

Anthony - Avmed Health Plans

Awesome experience. Best training course I've ever attended.

Jamie - Sierra Systems Group

Martin Folb is an excellent instructor. He was able to present this very technical material in a way that was understandable and at a pace that enabled most of us to get through all the labs, which reinforced the learning.

Tony - Wellesley College

Sasa was a great instructor! Very knowledgeable and well prepared - and always provided understandable explanations. I think the class would have benefited from Sasa teaching the Apache class as well!

Jodi - Mnbe

Neven did an excellent job!

Steve - Pearson

Excellent Training has giving such a great knowledge of Tomcat!

Brian - UC Davis

Very patient, great instructor, really knowledgeable. 'Excellent' really aplies to Sasa!

Arturo - Prescription Solutions

Very detail in the Tomcat architecture. And very good communication with Trainee and Trainner.

BOWEN - Newegg Inc.

The instructor is awesome, and very humorous :) I like this training

Edwin - Newegg Inc.

I am very very impressed, thank you.

Landon - Agrium Inc.

This course gave me a very clear understanding about setting up Tomcat, deploying applications and setting the security. I learnt the JDBC aspect of the Tomcat and I really benefitted from this training as a developer


Much better overall than the experience with the Apache Web Server training this week. This instructor actually 'taught' the material rather than just reading the book to us. His support of the material made a big difference. The book was better laid out for finding info and had some instructions for labs. ---Thank you! Excellent. I can now go back to work and understand what I am trying to do!
Great training, well organized. also the instructor has a great and deep understanding of the tomcat , as well as other related technologies.

Montaque - Newegg Inc.