Chapter 4: Tomcat Architecture . context.xml: The common
Chapter 4: Tomcat Architecture . context.xml: The common context.xml that is used by all Web applications. By default, this file is used to set up where to access the web.xml file in Web applications. . logging.properties: The default logging configuration used by the JULI logger. By default, it uses a ConsoleHandler and FileHandler and sets up the logging level on a per-application or package basis. . server.xml: The main configuration file for Tomcat. This file is used by the digester to build the container on startup to your specifications. This file follows the Tomcat architecture and will be discussed in more detail later in this chapter. . tomcat-users.xml: Used for security to access the Tomcat administration applications. It is used with the default UserDatabase Realm as referenced in server.xml. All credentials are commented by default and should be changed if uncommented. The Tomcat Administration application isn t accessible until entries are uncommented or placed into this file. . web.xml: The default web.xml file that is used by all Web applications. This web.xmlsets up the JSPServlet to allow your applications to handle JSPs and a default servlet to handle static resources and HTML files. It also sets up the default session timeout and welcome files such as index.jsp, index.htm, and index.html; and it sets up default MIME types for the most common extensions. In addition to these files, when an application is deployed to a Tomcat server, it creates the equivalent of a context.xml (usually named after the context path) with a structure following [engine name]/[host name]/[context path name].xml. As noted previously about the container-wide context.xmlfile, you can also create an [engine name]/[host name]/context.xml.default file where all Web applications under a specific host will adopt a set of default settings for the host s context. lib Directory The lib directory contains all of the JARs that are used by the container. This includes the Tomcat JARs and the Servlet and JSP application programming interfaces (APIs). This is the place where you place JARs that are shared across Web applications or JDBC JARs for connection pools. logs Directory This directory is used for the logging files that are produced while Tomcat is running. The JULI logging produces multiple files in this directory, and each log file is created for each day. temp Directory This is the temporary directory that Tomcat uses for scratch files and temporary use. webapps Directory The webapps directory is where your Web applications ultimately will live. If you are using an exploded WAR (a WAR file that is decompressed), it needs to be placed in this directory. Placing a WAR file in this directory also causes Tomcat to deploy the file. When you deploy a full WAR through the Manager console application or the Tomcat Client Deployer, your WAR file is also placed into this directory.
For reliable and cheap web hosting services please check tomcat web hosting website.