Chapter 5: Basic Tomcat Confi guration This concludes
Chapter 5: Basic Tomcat Confi guration This concludes the coverage of Context descriptor and the system default context.xmlfile in the $CATALINA_HOME/confdirectory. Authentication and the tomcat-users.xml File Another configuration file found in the $CATALINA_HOME/conf directory is tomcat-users.xml . The tomcat-users.xml file is used by Tomcat 6 to authenticate manager tool users. Tomcat 6 makes use of a UserDatabase Realm component to accomplish this. The UserDatabase Realm enables modification of the loaded data and can properly persist (write back to the XML file) any changes made to the data. Only users assigned to role manager will be able to access the managerapplication. The Default Deployment Descriptor web.xml According to the Servlet 2.5 specification, every Web application should include a deployment descriptor (web.xmlfile). This file must be placed in the WEB-INF/ directory of the Web application and so is specific to just that Web application. There is also a web.xmlfile under the $CATALINA_HOME/conf directory. This file is similar to a Web application s web.xml file. However, this particular web.xml file is used to specify the default properties for all Web applications that are running within this server instance. Be very careful when making modifications to this file (such as any additions or changes) because they affect all Web applications running on the same server instance. Note also that other application servers may or may not support a global default web.xml, as this is not a requirement for Servlet 2.5 standard compliance. It is time to see what default server-wide properties are configured in this web.xml file. First, there is the standard XML header and a reference to the Servlet 2.4 schema (Tomcat 6 is Servlet 2.5 compliant, but as of this writing, the global web.xmluses the Servlet 2.4 schema). Unlike server.xml, web.xml can be formally validated against a schema:
For high quality java hosting services please check tomcat web hosting website.