Chapter 5: Basic Tomcat Confi guration In this figure, a single Engine supports three fictitious Web sites via virtual hosts. The first one is foodnuts.com, the second one is buycarsnow.com, and the third one is betterbookends.com . Each virtual host is running a completely different Web application. The Engine is responsible for forwarding any incoming requests to the corresponding host. If the system were to be configured as depicted in the figure, there would be three elements nested within the single definition. A element is a container. It can have any one of the attributes shown in the following table. Attribute Description Required? className appBase autoDeploy name backgroundProcessDelay deployOnStartup deployXML The Java class that is used to handle requests for the host. The default is the Tomcat-supplied class org. apache.catalina.core.StandardHost, and this almost never needs to be changed. Used to set the default application-deployment source directory. Tomcat 6 will look in this directory for applications to be deployed. The path should be specified relative to the installation or per-instance base directory for the Tomcat 6 server. Setting this attribute to true means that Web applications will be automatically deployed or redeployed while Tomcat 6 is running. This includes any new applications placed into the directory specified by appBase (in WAR form or unarchived), any application whose web.xmldeployment descriptor has been modified, and any application whose Context descriptor has been modified. The default value is true. Background processing must be enabled for this to work properly. See deployOnStartupfor auto application deployment during Tomcat startup. The resolvable name of this virtual host. The delay in seconds before the background processing thread is enabled for this host and other nested components. Any nested component with its own backgroundProcessDelayset to a non-negative value will be ignored, indicating that it will manage its own background processing (if any). The default delay is -1, indicating that the parent s background processing thread should be used. When set to true, automatically deploys Web applications from this host during component startup. The default is true. Used primarily in security sensitive installations to restrict the processing of context.xmlembedded within a Web application (usually found in META-INF/ context.xml of the WAR file). If this is set to false, the context configuration needs to be placed under No Yes No Yes No No No
For high quality java hosting services please check tomcat web hosting website.
This entry was posted
on Tuesday, February 17th, 2009 at 2:21 am and is filed under tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.