Tomcat Administration Training Course
Course Summary
Administering Apache Tomcat training course covers the details of installing and configuring 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.[top] Duration
3 days.
[top] Objectives
Upon completion of Marakana's 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
[top] Audience
Marakana Tomcat Training course is for web/application server administrators who need to be able to install, configure, run, and tune the Apache Tomcat Application Server.
[top] Prerequisites
To get the most benefit from the Marakana Tomcat Training 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 these concepts are covered in the class.
[top] Instructors
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 conferencs, 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...
Aleksandar Gargenta is the technology brains at Marakana. Always on top of the latest in software, Aleksandar is the company's radar for technology that matters. His latest ventures are perfecting Marakana's Android Internals and Security courses.
Phew. And if that's not enough, he's also the chief architect of Marakana Spark, the on-demand software platform that powers marakana.com and a number of other training companies. As an instructor he's taught hundreds of classes for everyone from Apple to Disney, from NASA to the Department of Defense.
In his spare time Aleksandar runs the San Francisco Java, Android, and HTML5 User Groups with over three thousand members across the three groups.
Aleksandar holds a bachelor’s degree in Mathematics and Computer Science from the University of Waterloo. He is also a father, photographer, hiker, and a race-car driver :-)
[top] Outline
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)
- The <Server> element
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
- Static file handling
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
- Using valves for access control
- 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
[top] Additional Notes
About the Platform
Marakana Tomcat Training course can be taught on both Windows and UNIX/Linux-type environments. The instructor covers both options during the training.
Marakana.com Runs on Tomcat

Marakana.com is written in Java using Spring and Hibernate frameworks. We deploy it on Apache Tomcat Application Server. Both Marakana 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.
Java Meetup Organized by Marakana
Marakana team organizes and runs the San Francisco Java Meetup - an interactive group of Java developers. In our monthly meetings, we discuss Java landscape from both technology and business angles. We often have great presentations by industry experts, group discussions, as well as hands-on sessions. If you are in San Francisco Bay Area, we encourage you to join the group and meet other Java developers.
[top] Student Testimonials
Neven did an excellent job!
Awesome experience. Best training course I've ever attended.
Sasa was an excellent instructor and very patient with our many work related interruptions!
Very knowledgable, even about the tangents.
Highly recommend! Very good training course and company!
I am very very impressed, thank you.
It was definitely a very good learning experience.
Excellent Training has giving such a great knowledge of Tomcat!
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.
Definitely a worth while class. The instructor was great, he answered questions thoroughly and adapted his lesson plan to target my individual needs. I will certainly return to Marakana for additional training.
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!
The course met my expectations and the instructor covered the topic well. I will recommend the class to anyone wanting to learn Tomcat.
The class was very informative and interesting. We are in the process or implementing Tomcat with our CMS server. The information I wanted to learn was fully covered in this class. I would definitely recommend this class to my colleges.
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.
We may invite the instructor come to our company and teach us.
Loved the fact that the instructor was able to teach the information and catch up with the slides after the fact instead of just reading directly from the slides in the book. Plus, the real-life examples were extremely helpful in understanding the material better.
This training is great. Learned much from it.
Sasa is really smart and experienced. Leaned a lot from him. Laurent is a very nice guy and has a lot of potentials.
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.
Good Course. Met my expectations for the course. Sasa was very familar with the material and good instructor.
Aleksander is a great instructor!!!!!
Sasa was an excellent teacher.
Very knowledgeable instructor
One of the best classes I have ever had. Will definately be looking to come back again!
Loved it! Great info... great instructor!
This is THE course to take if you need to know more about Tomcat and THE guy to teach this course is Sasa. Awesome guy, well versed and knows his stuff inside and out. Very productive and well learned base to do more with Apache/TC. Thanks Marakana and Sasa for the great time in San Fran.
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
Instructor is excellent...
Very detail in the Tomcat architecture. And very good communication with Trainee and Trainner.
Thanks! Great class! I learned a lot and look forward to using what I learned next week.

