EncartaLabs

Apache Tomcat Administration

( Duration: 4 Days )

The Apache Tomcat Administration training course covers the details of installing and configuring the Tomcat Web Server. Attendees 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.

By attending Apache Tomcat Administration workshop, attendees will learn 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

  • 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

Web/Application Server Administrators who need to be able to install, configure, run, and tune the Apache Tomcat Application Server.

COURSE AGENDA

1

Intro to JavaEE

  • 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
2

Apache Tomcat Overview

  • 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
3

Installing Apache Tomcat

  • 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
4

Tomcat Directory Structure

  • 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
5

Tomcat Architecture and Configuration

  • 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 “Context” element
    • Overview
    • Configuration
  • The “Loader” element
    • Overview
  • The “Listener” element
    • Overview
    • Extending Tomcat
6

Logging on Tomcat

  • Default system logging
  • Using Log4J
  • Access Log Valve
  • Request Dumper Valve
7

Deployments and Web Apps on Tomcat

  • 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
8

Monitoring and Management on Tomcat

  • Tomcat Manager application
    • Overview
    • Accessing
    • Features
    • Starting and stopping applications
    • Deployments and un-deployments
    • Automation with non-HTML mode
    • Using w-get (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
9

Managing Resources on Tomcat

  • Overview of JNDI
  • Resources and JNDI on Tomcat
  • The “Environment” 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
10

Tomcat Security

  • 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 security
    • 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
11

Tomcat Performance Tuning

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

High Availability (HA) and Scalability of Tomcat

  • Fronting Tomcat with Apache
    • Overview
    • Pros/con
    • 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

Encarta Labs Advantage

  • One Stop Corporate Training Solution Providers for over 4,000 Modules on a variety of subjects
  • All courses are delivered by Industry Veterans
  • Get jumpstarted from newbie to production ready in a matter of few days
  • Trained more than 50,000 Corporate executives across the Globe
  • All our trainings are conducted in workshop mode with more focus on hands-on sessions

View our other course offerings by visiting http://encartalabs.com/course-catalogue-all.php

Contact us for delivering this course as a public/open-house workshop/online training for a group of 10+ candidates.

Top