Course Content
Intro to Java
- 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
- 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
- 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
- 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
- Tomcat architecture: the big-picture
- Overview of XML
- Overview of Tomcat conf/server.xml file
- Walk through the Tomcat component hierarchy
- The element
- Configuring the shutdown port
- The element
- The element
- Overview of connectors
- Configuration
- Tuning
- The element
- Understanding thread pooling
- The element
- Overview
- Understanding background threads
- The element
- Overview
- Configuration
- Virtual hosting on Tomcat
- The element
- The element
- Overview
- Configuration
- The element (more on this later)
- The element (more on this later)
- The element
- Overview
- The element (more on this later)
- The element (more on this later)
- The element
- Overview
- Extending Tomcat
- The element (more on this later)
Logging on Tomcat
- Defaut system logging
- Using Log4J
- Access Log Valve
- Request Dumper Valve
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
Monitoring and Management on Tomcat
- 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
- Overview of JNDI
- Resources and JNDI on Tomcat
- The Element
- The Element
- The 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
- 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
- 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
- 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
- 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
- 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