Apache Jakarta and Beyond: A Java Programmeramp;#039;s Introduction [Electronic resources]

Larne Pekowsky

نسخه متنی -صفحه : 207/ 135
نمايش فراداده

17.2. A Tour of Tomcat

Before diving into details of how Tomcat is used, it is worth taking a look at its structure. Within the directories created when the archive is uncompressed are the following subdirectories.

bin

This contains scripts for starting and stopping tomcat as well as some additional tools.

conf

This directory contains files used to configure Tomcat at the global level, although it is possible for each Web application to override many of the values provided here.

The most important file here is server.xml, which tells Tomcat the set of services to run when it starts up as well as what ports to listen to. This file also specifies the set of resources to make available to applications and a number of security parameters. This file will be encountered frequently throughout this chapter.

There is also a web.xml file in this directory, which establishes default values that may be overridden by values in each application's web.xml.

Two files, catalina.policy and catalina.properties, define parameters used by Tomcat as a whole. These values will almost never need to be changed, and these files may be safely ignored by all but the most advanced users.

jk2.properties defines a set of properties that are used when Tomcat is installed as an application server in conjunction with an external Web server such as Apache or IIS. Such usage is beyond the scope of this book, and for the remainder of this chapter it will be assumed that Tomcat is running in

stand-alone mode, where it operates as both a Web server and application server.