After you have Tomcat running, you will soon find a need to customize its configuration. For example, you might want to support virtual hosting. Tomcat also features realms, which are lists of users authorized to use specific sections of your web site. Using realms, we show you how to set up an example JDBC domain to talk to a relational database. We also show you many of the other configuration changes that you can make.
Configuring Tomcat is done by editing files and restarting Tomcat. The main configuration files provided with Tomcat 4 that reside in the $CATALINA_HOME/conf directory are:
The main Tomcat 4 configuration file.
A servlet specification standard format configuration file for servlets and other settings that are global to all web applications.
The default list of roles, users, and passwords used by
The Java 2 Standard Edition security policy file for Tomcat.
The first three files are well-formed XML documents, and they are parsed by Tomcat at startup; the web.xml file is also validated against an XML document type definition (DTD). The syntax of every important part of these configuration files is discussed in detail in this chapter; the elaboration of their usage and meaning makes up most of the rest of this book.
Note that the major elements in server.xml begin with a capital letter, whereas all of the elements in web.xml