
Basic introduction to tomcat
Install and start Tomcat on Ubuntu using OpenJDK, creating a non-root Tomcat user, extracting tar.gz binaries to /opt/tomcat, then set JAVA_HOME and verify in a browser.
Explore Tomcat's configuration file, server.xml, an XML file defining the Server, Service, connectors, Engine, Host, and Context. See how to locate conf/server.xml on a Unix system and inspect its structure.
Learn the tomcat startup sequence with setenv.sh to set JAVA_HOME, invoked by startup.sh/catalina.sh in the bin folder, then create setenv.sh, verify no process is running, and start tomcat on Linux.
Configure tomcat heap size and other java options by setting -Xms and -Xmx in CATALINA_OPTS via setenv.sh, and enable -Xloggc to log gc activity.
Review the tomcat log file configuration via logging.properties in the conf folder, including catalina, localhost, manager, and host-manager, and how catalina.out is handled by catalina.sh.
Rotate catalina.out log file using cronolog on Ubuntu; export CATALINA_OUT_CMD in catalina.sh, restart Tomcat, and verify date-based rotation.
Discover how Apache Tomcat logs access hits via the AccessLogValve configured in server.xml, stored in logs directory, and learn tokens like %h %T %r %s %b that populate log.
Learn how to add the time taken field to Apache Tomcat access logs by configuring the access log valve with %D, restarting the server, and verifying milliseconds in the log.
Deploy a sample war file to Apache Tomcat by copying it into the webapps folder, monitor deployment with log files, and access the sample, its JSP page, and servlet.
Undeploy the sample.war by deleting its tomcat webapps entry and folder with rm -rf, then verify removal by refreshing to see a 404 file not found.
Learn JDBC basics, the Java database connectivity API, and how SQL queries produce a result set, with Tomcat connection pools optimizing database access.
configure Tomcat to connect to a MySQL database using DBCP, set the context.xml and web.xml JNDI references, and test with a test.jsp.
Configure tomcat to connect to a database using JDBC connection pool, replacing DBCP, by setting a new JNDI name and referencing DataSourceFactory, then test with test2.jsp in conf/context.xml and webapps.
Explore tomcat jdbc pool settings, comparing dbcp and jdbc pool and covering 20 configuration options. Learn how maxActive, minIdle, testOnBorrow, validationQuery, and removeAbandoned and logAbandoned controls ensure reliable connections.
Learn JDBC connection pool tuning in a hands-on Tomcat lab, exploring maxTotal, maxIdle, minIdle, testWhileIdle, and eviction settings with load tests and live monitoring.
Configure a keystore for Apache Tomcat using keytool, generate an RSA keystore.jks with alias localhost, enable TLS and https on port 8443, noting the self-signed certificate will trigger browser warnings.
Configure Apache httpd to forward requests to Tomcat, enabling load balancing and static content handling. Route /test to Tomcat /sample via proxy connectors and verify in a browser.
Set up Apache httpd with mod-jk to connect to Tomcat via AJP v13, configuring server.xml port 8009 and worker.properties, and route the /sample application through a vhost.
Configure multiple tomcat instances by creating a distinct CATALINA_BASE, copying the bin and conf folders, editing server.xml ports, then start, test webapps, and verify shutdown.
Discover how Tomcat's lookup order prioritizes Catalina base before Catalina home. See why copying webapps into Catalina base resolves 404 errors and guarantees the correct instance runs.
Explore how APR compares Java programs and native code, explains blocking versus non-blocking io, and OpenSSL’s impact on tomcat performance for baseline testing.
Verify APR installation for Tomcat by checking log entries, then install and configure APR using configure, make, and make install with a prefix and API-SOS and API-Target folders.
Part two of four in APR installation demonstrates installing prerequisites on Linux, showing step-by-step package installations and a live demo as root on a Linux box.
Install APR on Linux by configuring with the target prefix, then make and make install, copy libraries to APR target, compile dependencies, start Tomcat, and review logs for APR status.
Enable http2 support in tomcat 9 by updating the http2 connector for the hdp s connector, restart the server, and verify with curl to read headers, ignoring certificates if needed.
Demonstrates configuring mod_jk to add Tomcat nodes behind a front-end load balancer. Shows how to configure workers, sticky sessions, and status while validating high availability through traffic failover.
Configure mod_jk with jk mounts and status, wire JSESSIONID for session tracking, and set JVMRoute for each Tomcat instance to enable stickiness in a two-node Tomcat cluster.
Set up a tomcat cluster, observe session persistence and replication, and enable distributable settings with the distributable tag to keep the same jsessionid across nodes.
In this course you will learn about tomcat administration. The operating system used in the course is Ubuntu but majority of the steps will work on Unix/Linux based operating systems. The course covers a number of topics from tomcat administration to configuration. Almost all of the topics are hands-on with some basic theory. The course is ideal for system admins who want to learn tomcat administration. There is absolutely no coding experience required. Some sys admin knowledge is required.
The specific version in this course is tomcat 9. While tomcat 9 has a few new features, majority of the configuration items discussed will apply to lower versions of tomcat as well.
After completing this course, you will be able to install tomcat, perform common administrative tasks and also perform advanced administrative tasks.
Version history
Nov 2024 Added an entire section on integration tomcat with LDAP !
June 2022 Added over an hour of content
Jan 2022 Added section for tomcat on Windows
June 2020 Added four videos on APR Installation series
June 2020 Added quizzes for each of the sections
Feb 2020 Added four videos on tomcat cluster series
Jan 2020 tomcat manager and host manager applications
Dec 2019 OS Startup Services for tomcat
Sep 2019 Added JDBC Settings Explained
Sep 2019 Added JDBC Settings Examples
June 2019 Added APR Introduction