Constitute:
1.server represents the entire Catalina Serverlet container
2.service: Consists of one or more connector and a shared engine processing engines
3.connector listens for customer requests on the specified port and gives the request to engine processing (Coyote HTTP and coyoteJK2)
4.Engine must be configured under Service components, the Engine can be configured with multiple virtual hosts.
5.host represents a virtual host, one or more Web applications under each virtual host, one context for each Web application, and one context path
6.context loading servlets based on $catalina_home/conf/web.xml and $webapp/web-inf/web.xml at creation time
Loading device:
How to place class and resource files
A. Corresponds to a Web application: class is placed under the web-inf/classes under the Web application under the jar under Web-inf/lib
B. Corresponds to multiple Web applications: class is placed in the $catalina_home/shared/class directory.
The Tomcat class is loaded (ClassLoader):
Bootstrap ($JAVA _home/jre/lib/ext/*.jar)
System ($CLASSPATH/*.class and the specified jar)
Common (classes,lib,endores three sub-directories under $CATALINA _home/common)
Catalina (Classes and Lib directories under $CATALINA _home/server/are only visible to Tomcat)
& Shared (the classes and Lib directories under $CATALINA _home/shared/, and $catalina_home/lib directories) are visible only to Web applications and are not visible to Tomcat
WEBAPP ($WEBAPP/web-inf/* only visible classes/*.class Lib/*.jar for this Web app)
For web apps, the order in which classes and resources are loaded is:
/web-inf/classes-->/web-inf/lib/*.jar-->bootstrap-->system-$CATALINA _home/common/classes
-$CATALINA _home/common/endores/*.jar-$CATALINA _home/common/lib/*.jar-$CATALINA _home/shared/ Classes
-$CATALINA _home/shared/lib/*.jar
Tomcat Server Principles