Meet Tomcat Catalina

https://www.mulesoft.com/tcat/tomcat-catalina

Tomcat is actually composed of a number of components, including a Tomcat JSP engine and a variety of different connectors, but its core component is called Catalina. Catalina provides Tomcat’s actual implementation of the servlet specification; when you start up your Tomcat server, you’re actually starting Catalina.

In this article, we’ll get to know Tomcat’s core component, from the origins of the name “Catalina”, to an overview of how Catalina is configured. We’ll also look at some Catalina-related tips and tricks, such as how to get the most out of Catalina’s built-in logging functionality, and how to manage the Catalina class as an MBean using JMX.
Tired of wading through hundreds of lines of XML just to make a simple change to your Tomcat configuration? Tcat makes Tomcat configuration simple. Create optimized configuration profiles, save them, and apply them to groups of servers with a single click.
How Did Catalina Get Its Name?
There’s nothing like an Apache product name to raise an eyebrow – the Apache volunteers have a knack for turning out oddly named technologies that’s only rivaled by Ubuntu’s “adjective-animal” naming format.
The name “Catalina,” according to Craig McClanahan, who designed the original architecture of the servlet container, can be attributed to three things: his love for Catalina Island (despite never having visited it), his cat’s habit of hanging around the computer while he was writing the code, and the consideration, at an early stage of development, of building Tomcat on a server framework called Avalon, which is the name of a town on Catalina island.
The Avalon framework was eventually abandoned, but the name stuck, and the rest is history.

Catalina’s Configuration Files

Catalina’s default behavior can be directly configured by editing the six configuration files located in Tomcat’s “$CATALINA_BASE/conf” directory. Here’s an overview of the files located in this directory and the kinds of options that can be configured within each.

catalina.policy

This file contains the Tomcat security policy for the Catalina Java class, expressed in standard Security Policy syntax, as defined in the JEE specification. This is Tomcat’s core security policy, and includes permissions definitions for system code, web applications, and Catalina itself.

catalina.properties

This file is a standard Java properties file for the Catalina class. It contains information such as security package lists and class loader paths. This file can also contains some String cache settings, that you might edit when tuning your server for best Tomcat performance.

logging.properties

This file configures the way that Catalina’s built-in logging functions, including things such as threshold and log location. Note that all the entries in this log refer to JULI, the modified commons-logging implementation that Tomcat automatically uses in place of your JDK’s logging implementation.

content.xml

This XML configuration file is used to define Tomcat Context information that will be loaded for every web application running on a given instance of Tomcat. In general, you should configure your Context information elsewhere, but there are a few entries in this file that can be uncommented to alter the way that Tomcat handles session persistence and Comet connections.

server.xml

This is Tomcat’s main configuration file, which uses the hierarchical syntax specified in the Java Servlet specification to configure Catalina’s initial state, as well as define the order in which Tomcat boots and builds its various components. This file is quite complex, but comprehensive documentation is available on the Apache website.

tomcat-users.xml

This file contains information about the various users, passwords, and user roles on a given Tomcat server, as well as information about trusted Realms (JNDI, JDBC, etc.) where this data can be accessed.

web.xml

This file configures options and values that will be applied to all applications loaded into a given instance of Tomcat, including servlet definitions such as buffer sizes, debugging levels, Jasper options like classpath, MIME types, and default welcome files for directories that do not have their own “index” files. Although you can technically configure options for specific web applications in this file, this will require you to restart your entire server to propagate these changes, so it is not recommended.

If you need more information about configuring Catalina, check out our Tomcat Configuration page!