Chapter 5: Basic Tomcat Confi guration zip application/zip

Chapter 5: Basic Tomcat Confi guration zip application/zip Simulating Apache Web Server: Welcome File Handling The last section in the web.xml file pertains only to Tomcat s standalone mode of operation. To be compatible with the default behavior of the Apache Web server, the default servlet will display a welcome file if the incoming URI is terminated, as shown in the following example: http://www.wrox.com/ The default servlet examines the root directory of the named virtual host ( www.wrox.com) and looks for index.html, index.htm, or index.jsp in turn to be displayed. Each Web application may override this list in its own deployment descriptor (web.xml ) file: index.html index.htm index.jsp In the following section, another file in the $CATALINA_HOME/conf directory catlina.policy is examined. Fine-Grained Access Control: catalina.policy Chapter 14 provides complete coverage of the role of the Tomcat security manager and its use of this policy file. For now, it is adequate to take a quick browse through the file to understand how it provides access control for a Tomcat 6 server administrator. Tomcat 6 leverages the built-in fine-grained security model of Java 2. When enabled, the basis of the security system is as follows: Any access to system resources that is not explicitly allowed is prohibited. This means that you must anticipate all the resources that the Tomcat 6 server will access, and explicitly grant permission for it to do so. By default, Catalina starts up without security. You need to start Tomcat 6 with the following option for it to run with a security manager: > startup -security It is only in this secured mode that the catalina.policy file will be read, processed, and enforced. Some of the more important sections of the catalina.policy file are discussed later in the chapter, but details of the file are not covered at this time. The general policy entry is in the following form, where the is typically a body of trusted code: grant { permission list… };

For high quality java hosting services please check tomcat web hosting website.

Comments are closed.