Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 771 | blopes | 1 | <!DOCTYPE html SYSTEM "about:legacy-compat"> |
| 2 | <html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"><link href="../images/docs-stylesheet.css" rel="stylesheet" type="text/css"><title>Apache Tomcat 9 Architecture (9.0.112) - Architecture Overview</title></head><body><div id="wrapper"><header><div id="header"><div><div><div class="logo noPrint"><a href="https://tomcat.apache.org/"><img alt="Tomcat Home" src="../images/tomcat.png"></a></div><div style="height: 1px;"></div><div class="asfLogo noPrint"><a href="https://www.apache.org/" target="_blank"><img src="../images/asf-logo.svg" alt="The Apache Software Foundation" style="width: 266px; height: 83px;"></a></div><h1>Apache Tomcat 9 Architecture</h1><div class="versionInfo"> |
||
| 3 | Version 9.0.112, |
||
| 4 | <time datetime="2025-11-06">Nov 6 2025</time></div><div style="height: 1px;"></div><div style="clear: left;"></div></div></div></div></header><div id="middle"><div><div id="mainLeft" class="noprint"><div><nav><div><h2>Links</h2><ul><li><a href="../index.html">Docs Home</a></li><li><a href="index.html">Architecture Home</a></li><li><a href="https://cwiki.apache.org/confluence/display/TOMCAT/FAQ">FAQ</a></li><li><a href="#comments_section">User Comments</a></li></ul></div><div><h2>Contents</h2><ul><li><a href="index.html">Contents</a></li><li><a href="overview.html">Overview</a></li><li><a href="startup.html">Server Startup</a></li><li><a href="requestProcess.html">Request Process</a></li></ul></div></nav></div></div><div id="mainRight"><div id="content"><h2>Architecture Overview</h2><h3 id="Overview">Overview</h3><div class="text"> |
||
| 5 | <p> |
||
| 6 | This page provides an overview of the Tomcat server architecture. |
||
| 7 | </p> |
||
| 8 | </div><h3 id="Terms">Terms</h3><div class="text"> |
||
| 9 | |||
| 10 | <div class="subsection"><h4 id="Server">Server</h4><div class="text"> |
||
| 11 | <p> |
||
| 12 | In the Tomcat world, a |
||
| 13 | <a href="../config/server.html">Server</a> represents the whole container. |
||
| 14 | Tomcat provides a default implementation of the |
||
| 15 | <a href="../api/org/apache/catalina/Server.html">Server interface</a> |
||
| 16 | which is rarely customized by users. |
||
| 17 | </p> |
||
| 18 | </div></div> |
||
| 19 | |||
| 20 | <div class="subsection"><h4 id="Service">Service</h4><div class="text"> |
||
| 21 | <p> |
||
| 22 | A <a href="../config/service.html">Service</a> is an intermediate component |
||
| 23 | which lives inside a Server and ties one or more Connectors to exactly one |
||
| 24 | Engine. The Service element is rarely customized by users, as the default |
||
| 25 | implementation is simple and sufficient: |
||
| 26 | <a href="../api/org/apache/catalina/Service.html">Service interface</a>. |
||
| 27 | </p> |
||
| 28 | </div></div> |
||
| 29 | |||
| 30 | <div class="subsection"><h4 id="Engine">Engine</h4><div class="text"> |
||
| 31 | <p> |
||
| 32 | An |
||
| 33 | <a href="../config/engine.html">Engine</a> represents request processing |
||
| 34 | pipeline for a specific Service. As a Service may have multiple Connectors, |
||
| 35 | the Engine receives and processes all requests from these connectors, handing |
||
| 36 | the response back to the appropriate connector for transmission to the client. |
||
| 37 | The <a href="../api/org/apache/catalina/Engine.html">Engine interface</a> |
||
| 38 | may be implemented to supply custom Engines, though this is uncommon. |
||
| 39 | </p> |
||
| 40 | <p> |
||
| 41 | Note that the Engine may be used for Tomcat server clustering via the |
||
| 42 | jvmRoute parameter. Read the Clustering documentation for more information. |
||
| 43 | </p> |
||
| 44 | </div></div> |
||
| 45 | |||
| 46 | <div class="subsection"><h4 id="Host">Host</h4><div class="text"> |
||
| 47 | <p> |
||
| 48 | A <a href="../config/host.html">Host</a> is an association of a network name, |
||
| 49 | e.g. www.yourcompany.com, to the Tomcat server. An Engine may contain |
||
| 50 | multiple hosts, and the Host element also supports network aliases such as |
||
| 51 | yourcompany.com and abc.yourcompany.com. Users rarely create custom |
||
| 52 | <a href="../api/org/apache/catalina/Host.html">Hosts</a> |
||
| 53 | because the |
||
| 54 | <a href="../api/org/apache/catalina/core/StandardHost.html">StandardHost |
||
| 55 | implementation</a> provides significant additional functionality. |
||
| 56 | </p> |
||
| 57 | </div></div> |
||
| 58 | |||
| 59 | <div class="subsection"><h4 id="Connector">Connector</h4><div class="text"> |
||
| 60 | <p> |
||
| 61 | A Connector handles communications with the client. There are multiple |
||
| 62 | connectors available with Tomcat. These include the |
||
| 63 | <a href="../config/http.html">HTTP connector</a> which is used for |
||
| 64 | most HTTP traffic, especially when running Tomcat as a standalone server, |
||
| 65 | and the <a href="../config/ajp.html">AJP connector</a> which implements |
||
| 66 | the AJP protocol used when connecting Tomcat to a web server such as |
||
| 67 | Apache HTTPD server. Creating a customized connector is a significant |
||
| 68 | effort. |
||
| 69 | </p> |
||
| 70 | </div></div> |
||
| 71 | |||
| 72 | <div class="subsection"><h4 id="Context">Context</h4><div class="text"> |
||
| 73 | <p> |
||
| 74 | A |
||
| 75 | <a href="../config/context.html">Context</a> |
||
| 76 | represents a web application. A Host may contain multiple |
||
| 77 | contexts, each with a unique path. The |
||
| 78 | <a href="../api/org/apache/catalina/Context.html">Context |
||
| 79 | interface</a> may be implemented to create custom Contexts, but |
||
| 80 | this is rarely the case because the |
||
| 81 | <a href="../api/org/apache/catalina/core/StandardContext.html"> |
||
| 82 | StandardContext</a> provides significant additional functionality. |
||
| 83 | </p> |
||
| 84 | </div></div> |
||
| 85 | </div><h3 id="Comments">Comments</h3><div class="text"> |
||
| 86 | <p> |
||
| 87 | Tomcat is designed to be a fast and efficient implementation of the |
||
| 88 | Servlet Specification. Tomcat came about as the reference implementation |
||
| 89 | of this specification, and has remained rigorous in adhering to the |
||
| 90 | specification. At the same time, significant attention has been paid |
||
| 91 | to Tomcat's performance and it is on par with other servlet containers, |
||
| 92 | including commercial ones. |
||
| 93 | </p> |
||
| 94 | <p> |
||
| 95 | In current releases of Tomcat, we aim to make Tomcat manageable via JMX. |
||
| 96 | Manageability continues to be a primary area of concern and ongoing development. |
||
| 97 | </p> |
||
| 98 | </div></div></div></div></div><footer><div id="footer"> |
||
| 99 | Copyright © 1999-2025, The Apache Software Foundation |
||
| 100 | <br> |
||
| 101 | Apache Tomcat, Tomcat, Apache, the Apache Tomcat logo and the Apache logo |
||
| 102 | are either registered trademarks or trademarks of the Apache Software |
||
| 103 | Foundation. |
||
| 104 | </div></footer></div></body></html> |