Chapter 4: Tomcat Architecture Tomcat comes standard with
Chapter 4: Tomcat Architecture Tomcat comes standard with several applications that reside in this directory: . ROOT: The welcome screen application. This is a special directory that designates the / root of your Web container. When you move Tomcat to a production environment you would likely remove this directory if your application reuses the / root context. . docs: Contains the Tomcat documentation. It is the same documentation you would find on the http://tomcat.apache.org/tomcat-6.0-doc Web site. . examples: Contains the JSP and servlet examples. . host-manager: An application that allows you to manage the hosts that run in your application. Accessible from the /host-manager/html URL. It requires that you have set up proper credentials in the conf/tomcat-users.xmlfile to access this application. . manager: An application that allows you to manage your applications in Tomcat. From this application you can start, stop, reload, deploy, and undeploy your applications. It is accessible from the /manager/html URL. It requires that you have set up proper credentials in the conf/tomcat-users.xmlfile to access this application. work Directory Directory for temporary and working files. This is heavily used during JSP compilation where the JSP is converted to a Java servlet and accessed through this directory. An Overview of Tomcat Architecture Tomcat s architecture was completely revised for version 4. It was rebuilt from the ground up because some users felt that the refactoring done in the previous Tomcat release, while improving its performance and flexibility, was always going to result in a somewhat limited server. A rather heated debate ensued regarding whether this was actually the case. The result of this controversy was the 3.2 architecture branching from the main development tree in a continued refactoring effort, leaving the 4.0 version to become the main focus of the project. Tomcat 6 is the latest iteration of the Tomcat 4 architecture. Tomcat 6 supports the latest Servlet and JSP specifications, versions 2.5 and 2.1, respectively. Tomcat 6 consists of a nested hierarchy of components. Some of these components are called top-level components because they exist at the top of the component hierarchy in a rigid relationship with one another. Containers are components that can contain a collection of other components. Components that can reside in containers, but cannot themselves contain other components, are called nested components. Figure 4-2 illustrates the structure of a typical Tomcat 6 configuration. This diagram represents the most complete topology of a server. However, you should be aware that some of these objects can be removed without affecting the server s performance. Notably, the Engine and Host may be unnecessary if an external Web server (such as Apache) is carrying out the tasks of resolving requests to Web applications. This topology also allows components to be created and removed on-the-fly, or while the container is running. This is evidenced through the host-manager application, where you can add and remove Host objects at will. This is further demonstrated through the manager application where you are able to stop, start, deploy, and undeploy Web applications, which literally are Context objects.
For reliable and cheap web hosting services please check tomcat web hosting website.