Monday, October 19, 2009

Files in $CATALINA_HOME/conf





























Chapter 5 -
Basic Tomcat Configuration
byVivek Chopra, Ben Galbraithet al.
Wrox Press 2003































Files in $CATALINA_HOME/conf


In the $CATALINA_HOME/conf directory of the Tomcat 4 server distribution, you will see five files (as of Tomcat 4.1.3). Here is a brief synopsis of each of these files:





  • server.xml


    This is the main configuration file for the Tomcat 4 server and is the one that Tomcat actually reads at startup. It contains a configuration that is ready to run on your machine immediately. It contains declarations for many example web applications that come with the Tomcat 4 distribution. Since the example applications take up memory space and consume processing time to load, it is usual practice to remove them for production systems since they are not needed. This is the main reason for a server-noexamples.xml.config file (discussed next).





  • server-noexamples.xml.config


    This file contains a blank template of server.xml. This enables you, as the administrator, to easily create your own version of sever.xml without having to remove standard Tomat examples definitions from it. In practice, if you need to custom configure your server, it may be easier to start with this file and then rename the resulting file to server.xml. There are also detailed comments within this file to assist in understanding the options available when configuring the server.





Both the previous files are server configuration files, only one of which is needed at any time:





  • tomcat-users.xml


    This is the file that contains user authentication and role mapping information for setting up a memory realm. Tomcat's manager application and graphical Admin application can use it. Memory realm, a feature in Tomcat 4 discussed in Chapter 8 has extensive information on UserDatabase.





  • web.xml


    This is a default deployment descriptor file for any web applications that are running on this Tomcat server instance. It provides basic servlet definition and MIME mappings for all web applications, and also acts as the deployment descriptor for any web application that does not have its own deployment descriptor.





  • catalina.policy


    Java 2 has a fine-grained security model that enables the administrator to control in detail the accessibility of system resources. This is the default policy file for running Tomcat 4 in secured mode. We shall cover this in detail later.



















No comments:

Post a Comment