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]

Photo

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...
Photo

Gordon Force has 25 years of product development experience as a developer, architect, director and instructor. Previously, he led development and application support for the ConnectPay and Encompass products at First Data. Agile development, with a heavy emphasis on testing, contributed to an effective strategy for consistently delivering new features on time, with high quality and industry compliance. Gordon now leads NewCircle as CEO.

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
    • CATALINA_HOME vs. CATALINA_BASE

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.

Trademarks

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


Student Testimonials [top]

I was very impressed by the teacher knowled of the subject. Excellent!

Andre - FRBSF

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

Neven did an excellent job!

Steve - Pearson

Good instructor. Very interactive. Thanks.

James - Newegg Inc.

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.

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

Jamie - Sierra Systems Group

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

Renato - Williams-Sonoma, Inc.

Instructor is excellent...

Mike - Prescription

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

It was definitely a very good learning experience.

Jay - Avery Dennison

The course met my expectations and the instructor covered the topic well. I will recommend the class to anyone wanting to learn Tomcat.

Andrew - HCA

Class was exactly what I needed and wanted. Expectations were exceeded as we learned overall java concepts as well as specifics to apache tomcat. The few items the instructor was unfamiliar with he researched and found the appropriate answers for. I would highly recommend this class for any one trying to obtain tomcat skill or understand overall Middle ware application server skills. The snippets of development were helpful to understand the overall technology and how it all works together.

Kevin S. - Accenture

teacher is awsome.

Jeff - Newegg Inc.

Sasa was an excellent teacher.

Maria - Whitehead Institute for Biomedical Research

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

BOWEN - Newegg Inc.

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

Sasa took time out to help me address some issues that we have been having on a new Tomcat implementation, so major Kudos to Sasa

David - Home

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

Brett - SkillSoft

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

We may invite the instructor come to our company and teach us.

John T. - Northrop Grumman

I am very very impressed, thank you.

Landon - Agrium Inc.

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!
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

Enjoyed the course greatly. Received some new thoughts on what I can do to better implement Tomcat.
Very nice, thanks for teacher's hard work!

FAN - Newegg Inc.

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

Edwin - Newegg Inc.

Great class. Would love to take the Apache one.

Chuck - Williams-Sonoma, Inc.

Excellent Training has giving such a great knowledge of Tomcat!

Brian - UC Davis

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