Apache Tomcat Architecture Overview

Apache Tomcat J2EE Server

Tomcat Architecture can be broken down into a set of containers including a server, a service, a connector, an engine, a host, and a context. By default, each of these containers is configured using the server.xml file

Architecture of Tomcat 7


The Server

The first container element referenced in this snippet is the <Server> element. It represents the entire Catalina servlet engine and is used as a top-level element for a single Tomcat instance. The <Server> element may contain one or more <Service> containers.

The Service

The next container element is the <Service> element, which holds a collection of one or more <Connector> elements that share a single <Engine> element. N-number of <Service> elements may be nested inside a single <Server> element.

The Connector

The next type of element is the <Connector> element, which defines the class that does the actual handling requests and responses to and from a calling client application.

The Engine

The third container element is the <Engine> element. Each defined <Service> can have only one <Engine> element, and this single <Engine> component handles all requests received by all of the defined <Connector> components defined by a parent service.

The Host

The <Host> element defines the virtual hosts that are contained in each instance of a Catalina <Engine>. Each <Host> can be a parent to one or more web applications, with each being represented by a <Context> component.

The Context

The <Context> element is the most commonly used container in a Tomcat instance. Each <Context> element represents an individual web application that is running within a defined <Host>. There is no limit to the number of contexts that can be defined within a <Host>.

The Tomcat installation directory is referred to as CATALINA_HOME. Below table describes the directories that compose a Tomcat installation. It is assumed that each of these directories is contained within the CATALINA_HOME directory.

/bin Contains the startup and shutdown scripts for both Windows and Linux. Jar files with classes required for tomcat to start are also stored here.

/conf Contains the main configuration files for Tomcat. The two most important are server.xml and the global web.xml.

/lib Contains the Tomcat Java Archive (jar) files, shared across all Tomcat components. All web applications deployed to Tomcat can access the libraries stored here. This includes the Servlet API and JSP API libraries.

/logs Contains Tomcat’s log files.

/temp Temporary file system storage.

/webapps The directory where all web applications are deployed, and where you place your WAR file when it is ready for deployment.

/work Tomcat’s working directory where Tomcat places all servlets that are generated from JSPs. If you want to see exactly how a particular JSP is interpreted, look in this directory.


For detailed information on server.xml you can check below link Server.xml Container Configurations.


In case of any ┬ęCopyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply