TOMCAT5 Web application start-up sequence

Source: Internet
Author: User

TOMCAT5 Web application launch sequence [bookmark this page] [print] Anonymous2007-07-17 Content navigation:1th page "IT168 Technical Document" Summary:
  
The application of Tomcat is very common to us, but for each user, should understand its operation mechanism is also essential, I in the maintenance of "Apache Open source project" Forum encountered this problem, and a few studies, hope to share with you.
  
   first, the Web app load order when configuring automatic deployment:
  
When Autodeploy=true and Unpackwars=true are configured in Tomcat's Server.xml for virtual host (hosts), such as:
Server.xml
... Unpackwars= "true" autodeploy= "true"
Xmlvalidation= "false" xmlnamespaceaware= "false";
  
The following deployment sequence occurs when Tomcat starts:
  
1. Any Web application with a context descriptor (contextual descriptors) is first deployed, and Tomcat is in $catalina_home/conf/[enginename]/[hostname]/ In the directory, Luo lists all XML-terminated files as context descriptors for web apps and deploys them by file name.
  
Note the file name as the context descriptor may not be the Web app name, because Tomcat will read the contents to judge, but changing the file name of the context descriptor will change the order of the deployment.
  
Such as:
$CATALINA _home\conf\catalina\localhost\devoffer.xml
  
<?xml version= ' 1.0 ' encoding= ' utf-8 '? ><context docbase= "E:/eclipse3.1rc3/workspace/devofferproject/web" Path= "/devoffer" usenaming= "false" workdir= "Work\catalina\localhost\devoffer" ></Context>
  
The context descriptor above illustrates the docbase and deployment path of the Devoff Web application and its working directory.
  
2. In addition, the context.xml in the $catalina_home/webapps/[webappname]/meta-inf/directory is also used as a context descriptor, which is handled in the $catalina_home/conf/[ After the context descriptor in the enginename]/[hostname]/directory, Tomcat deploys these context.xml in the Web app's Meta-inf directory. The order of loading follows the alphabetical order of the application name.
  
3. Web apps that have been expanded without context descriptors will be deployed one by one in their application name order, if one of the Web apps is associated with a war file in AppBase (typically the "$CATALINA _home/webapps" directory). When the war file is newer than the corresponding expanded web app, the expanded web app is deleted, and Tomcat expands and deploys the war file as an alternative to the old web App.
  
4. After performing 1-3 steps, Tomcat will deploy the war file in the AppBase.
  
Note: After each app is deployed, Tomcat establishes a context descriptor for a web app that does not have a context descriptor.
  
   second, the application loading order under the non-automatic deployment configuration:
  
This is followed by the manual deployment sequence in Tomcat Manager.
  
   iii. Reference Resources:
  
Http://tomcat.apache.org/tomcat-5.5-doc/deployer-howto.html

TOMCAT5 Web application start-up sequence

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.