1 | <html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Apache Tomcat Architecture - Architecture Overview</title><meta value="Yoav Shapira" name="author"><meta value="yoavs@apache.org" name="email"></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="0" width="100%" border="0"><!--PAGE HEADER--><tr><td><!--PROJECT LOGO--><a href="http://tomcat.apache.org/"><img border="0" alt=" |
---|
2 | The Apache Tomcat Servlet/JSP Container |
---|
3 | " align="right" src="../images/tomcat.gif"></a></td><td><font face="arial,helvetica,sanserif"><h1>Apache Tomcat 6.0</h1></font></td><td><!--APACHE LOGO--><a href="http://www.apache.org/"><img border="0" alt="Apache Logo" align="right" src="../images/asf-logo.gif"></a></td></tr></table><table cellspacing="4" width="100%" border="0"><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><tr><!--LEFT SIDE NAVIGATION--><td nowrap="true" valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="../index.html">Docs Home</a></li></ul><p><strong>Contents</strong></p><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></td><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td valign="top" align="left"><h1>Apache Tomcat Architecture</h1><h2>Architecture Overview</h2></td><td nowrap="true" valign="top" align="right"><small><a href="printer/overview.html"><img alt="Printer Friendly Version" border="0" src="../images/printer.gif"><br>print-friendly<br>version |
---|
4 | </a></small></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Overview"><strong>Overview</strong></a></font></td></tr><tr><td><blockquote> |
---|
5 | <p> |
---|
6 | This page provides an overview of the Tomcat server architecture. |
---|
7 | </p> |
---|
8 | </blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Terms"><strong>Terms</strong></a></font></td></tr><tr><td><blockquote> |
---|
9 | |
---|
10 | <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Server"><strong>Server</strong></a></font></td></tr><tr><td><blockquote> |
---|
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="../catalina/docs/api/org/apache/catalina/Server.html">Server interface.</a>, |
---|
16 | and this is rarely customized by users. |
---|
17 | </p> |
---|
18 | </blockquote></td></tr></table> |
---|
19 | |
---|
20 | <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Service"><strong>Service</strong></a></font></td></tr><tr><td><blockquote> |
---|
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="../catalina/docs/api/org/apache/catalina/Service.html">Service interface</a>. |
---|
27 | </p> |
---|
28 | </blockquote></td></tr></table> |
---|
29 | |
---|
30 | <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Engine"><strong>Engine</strong></a></font></td></tr><tr><td><blockquote> |
---|
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 received 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="../catalina/docs/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 | </blockquote></td></tr></table> |
---|
45 | |
---|
46 | <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Host"><strong>Host</strong></a></font></td></tr><tr><td><blockquote> |
---|
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="../catalina/docs/api/org/apache/catalina/Host.html">Hosts</a> |
---|
53 | because the |
---|
54 | <a href="../catalina/docs/api/org/apache/catalina/core/StandardHost.html">StandardHost |
---|
55 | implementation</a> provides significant additional functionality. |
---|
56 | </p> |
---|
57 | </blockquote></td></tr></table> |
---|
58 | |
---|
59 | <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Connector"><strong>Connector</strong></a></font></td></tr><tr><td><blockquote> |
---|
60 | <p> |
---|
61 | A Connector handles communications with the client. There are multiple |
---|
62 | connectors available with Tomcat, all of which implement the |
---|
63 | <a href="../catalina/docs/api/org/apache/catalina/Connector.html">Connector |
---|
64 | interface.</a> These include the |
---|
65 | <a href="../config/coyote.html">Coyote connector</a> which is used for |
---|
66 | most HTTP traffic, especially when running Tomcat as a standalone server, |
---|
67 | and the <a href="../config/jk2.html">JK2 connector</a> which implements |
---|
68 | the AJP procotol used when connecting Tomcat to an Apache HTTPD server. |
---|
69 | Creating a customized connector is a significant effort. |
---|
70 | </p> |
---|
71 | </blockquote></td></tr></table> |
---|
72 | |
---|
73 | <table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#828DA6"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Context"><strong>Context</strong></a></font></td></tr><tr><td><blockquote> |
---|
74 | <p> |
---|
75 | A |
---|
76 | <a href="../config/context.html">Context</a> |
---|
77 | represents a web application. A Host may contain multiple |
---|
78 | contexts, each with a unique path. The |
---|
79 | <a href="../catalina/docs/api/org/apache/catalina/Context.html">Context |
---|
80 | interface</a> may be implemented to create custom Contexts, but |
---|
81 | this is rarely the case because the |
---|
82 | <a href="../catalina/docs/api/org/apache/catalina/core/StandardContext.html"> |
---|
83 | StandardContext</a> provides significant additional functionality. |
---|
84 | </p> |
---|
85 | </blockquote></td></tr></table> |
---|
86 | </blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Comments"><strong>Comments</strong></a></font></td></tr><tr><td><blockquote> |
---|
87 | <p> |
---|
88 | Tomcat is designed to be a fast and efficient implementation of the |
---|
89 | Servlet Specification. Tomcat came about as the reference implementation |
---|
90 | of this specification, and has remained rigorous in adhering to the |
---|
91 | specification. At the same time, significant attention has been paid |
---|
92 | to Tomcat's performance and it is now on par with other servlet containers, |
---|
93 | including commercial ones. |
---|
94 | </p> |
---|
95 | <p> |
---|
96 | In recent releases of Tomcat, mostly starting with Tomcat 5, |
---|
97 | we have begun effots to make more aspects of Tomcat managable via |
---|
98 | JMX. In addition, the Manager and Admin webapps have been greatly |
---|
99 | enhanced and improved. Managability is a primary area of concern |
---|
100 | for us as the product matures and the specification becomes more |
---|
101 | stable. |
---|
102 | </p> |
---|
103 | </blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em> |
---|
104 | Copyright © 1999-2008, Apache Software Foundation |
---|
105 | </em></font></div></td></tr></table></body></html> |
---|