First Technology Transfer

Standard and Advanced Technical Training, Consultancy and Mentoring

WEB102 - Tomcat Installation Configuration and Administration (3 days)

This course is aimed at programmers, administrators and support personnel who need to understand the Tomcat Web Server, Tomcat server installation and configuration, and the integration of Apache with CGI scripting languages such as Perl and Python. Attendees should have some knowledge of Unix/Linux system administration. Some basic knowledge of Java would be useful. Java programming skills are not required as Java Server Pages and Servlets will be provided with associated documentation.

Course Background

The course will cover the procedures needed to install, configure and manage Tomcat Web Server environments. In particular attendees will learn how to

  • Install and setting up Tomcat under Linux
  • Understanding how Tomcat relates to Java EE (J2EE), Java Servlets and Java Server Pages
  • How Tomcat compares with other Java application servers such as JBoss (WildFly) and WebSphere Application Server(WAS)
  • How to deploy, support, and troubleshoot applications running on Tomcat
  • The logic underlying Tomcat's directory structure
  • Understanding Tomcat's configuration files - server.xml, context.xml, .properties ...
  • Tomcat architecture, application structure and the application configuration web.xml file
  • Tomcat and Tomcat application security
  • Configuring Tomcat for SSL
  • Tuning Tomcat performance and combining Apache with Tomcat to achieve load balancing and high availability
  • Advanced Tomcat performance related topics - server affinity through sticky sessions and session replication via Tomcat Clustering

Course Contents

  • Overview of Tomcat and Underlying Java frameworks and technologies
    • Java Servlets, Java Server Pages (JSPs), J2EE and how they relate to Tomcat
    • Model View Controller Design Pattern and J2EE
    • The Apache Foundation Tomcat project
    • Alternatives to Tomcat
  • Apache Tomcat Installation
    • Installing Java
    • Downloading and installing Tomcat pre-built binaries
    • Building Tomcat from source code
    • Running Tomcat as a Linux daemon / Windows Service
  • Overview of the Tomcat Directory Structure
    • bin/ and /lib directories
    • Class loading and Tomcat
    • conf/ and context directories
    • webapps/ directory
    • temp/ logs/ and work/ directories
    • Running multiple Tomcat instances from a single installation
  • Tomcat Configuration
    • Tomcat architecture - an overview
    • Overview of XML
    • Tour of the Tomcat conf/server.xml configuration file
      • <Server> element and shutdown port configuration
      • <Connector> and <Executor> elements
      • <Engine> element
      • <Host> element and virtual hosting on TomcaT
      • <Context> element
      • <Valve> element
      • <Realm>, <Manager> and <Resource> elements
      • <Listener> element
      • <Cluster> element
  • Tomcat Logging system
    • Default Tomcat system logging
    • Logging using Log4J
    • Request Dumper Valve
    • Access Log Valve
  • Deploying Web Apps on Tomcat
    • Web Apps - directory structure
    • WEB-INF/web.xml deployment descriptor
      • Common elements
      • Servlet and Filter - definition and mapping
      • web app initialisation
      • Session configuration
      • Error pages
      • Resources
      • Welcome file list
      • JNDI entries
    • Creating and deploying Web Archive (.war) files
    • The Tomcat conf/web.xml file
      • Static file handling
      • JSP handling
      • MIME types
      • Default ession configuration
  • Tomcat Monitoring and Management
    • Starting and stopping applications
    • Deployment and undeployment
    • Automation - wget, and integration with Ant, Maven
    • Monitoring
    • Java Management Extensions(JMX) and Tomcat
  • Tomcat Resource Management
    • JNDI
    • JavaMail and Tomcat
    • Database integration
  • Tomcat Security
    • User and directory permissions
    • Security Manager
    • Running on priviledged ports - TCP Port Relaying, jsvc
    • Access control using valves (Address valves vs. host valves)
    • Authentication and authorisation
    • Configuring SSL/TLS on Tomcat
      • SSL Certificates
      • SSL Connector configuration
      • Requiring applications use SSL
  • High availability, Scalability and Performance Tuning
    • Java/JVM tuning - heap sizing, jit compiling, garbage collection policies
    • Tomcat tuning - connectors, jsp, sessions, scaling
    • Fronting Tomcat with Apache - mod_jk vs. mod_proxy_ajp, load balancing
    • Using JMeter to load test configurations