女人天堂在线_美女福利视频在线观看_欧美影院天天5g天天爽_九九久久久久久_国产一区在线精品_国产精品suv一区二区_亚洲国产你懂的_99久久99久久免费精品小说_日韩av中文字幕在线_伊人影院蕉久552

Tomcat Web Application Deployment

Table of Contents

Introduction

Deployment is the term used for the process of installing a web application (either a 3rd party WAR or your own custom web application) into the Tomcat server.

Web application deployment may be accomplished in a number of ways within the Tomcat server.

  • Statically; the web application is setup before Tomcat is started
  • Dynamically; by directly manipulating already deployed web applications (relying on auto-deployment feature) or remotely by using the Tomcat Manager web application

The Tomcat Manager is a web application that can be used interactively (via HTML GUI) or programmatically (via URL-based API) to deploy and manage web applications.

There are a number of ways to perform deployment that rely on the Manager web application. Apache Tomcat provides tasks for Apache Ant build tool. Apache Tomcat Maven Plugin project provides integration with Apache Maven. There is also a tool called the Client Deployer, which can be used from a command line and provides additional functionality such as compiling and validating web applications as well as packaging web application into web application resource (WAR) files.

Installation

There is no installation required for static deployment of web applications as this is provided out of the box by Tomcat. Nor is any installation required for deployment functions with the Tomcat Manager, although some configuration is required as detailed in the Tomcat Manager manual. An installation is however required if you wish to use the Tomcat Client Deployer (TCD).

The TCD is not packaged with the Tomcat core distribution, and must therefore be downloaded separately from the Downloads area. The download is usually labelled apache-tomcat-8.5.x-deployer.

TCD has prerequisites of Apache Ant 1.6.2+ and a Java installation. Your environment should define an ANT_HOME environment value pointing to the root of your Ant installation, and a JAVA_HOME value pointing to your Java installation. Additionally, you should ensure Ant's ant command, and the Java javac compiler command run from the command shell that your operating system provides.

  1. Download the TCD distribution
  2. The TCD package need not be extracted into any existing Tomcat installation, it can be extracted to any location.
  3. Read Using the Tomcat Client Deployer

A word on Contexts

In talking about deployment of web applications, the concept of a Context is required to be understood. A Context is what Tomcat calls a web application.

In order to configure a Context within Tomcat a Context Descriptor is required. A Context Descriptor is simply an XML file that contains Tomcat related configuration for a Context, e.g naming resources or session manager configuration. In earlier versions of Tomcat the content of a Context Descriptor configuration was often stored within Tomcat's primary configuration file server.xml but this is now discouraged (although it currently still works).

Context Descriptors not only help Tomcat to know how to configure Contexts but other tools such as the Tomcat Manager and TCD often use these Context Descriptors to perform their roles properly.

The locations for Context Descriptors are:

  1. $CATALINA_BASE/conf/[enginename]/[hostname]/[webappname].xml
  2. $CATALINA_BASE/webapps/[webappname]/META-INF/context.xml

Files in (1) are named [webappname].xml but files in (2) are named context.xml. If a Context Descriptor is not provided for a Context, Tomcat configures the Context using default values.

Deployment on Tomcat startup

If you are not interested in using the Tomcat Manager, or TCD, then you'll need to deploy your web applications statically to Tomcat, followed by a Tomcat startup. The location you deploy web applications to for this type of deployment is called the appBase which is specified per Host. You either copy a so-called exploded web application, i.e non-compressed, to this location, or a compressed web application resource .WAR file.

The web applications present in the location specified by the Host's (default Host is "localhost") appBase attribute (default appBase is "$CATALINA_BASE/webapps") will be deployed on Tomcat startup only if the Host's deployOnStartup attribute is "true".

The following deployment sequence will occur on Tomcat startup in that case:

  1. Any Context Descriptors will be deployed first.
  2. Exploded web applications not referenced by any Context Descriptor will then be deployed. If they have an associated .WAR file in the appBase and it is newer than the exploded web application, the exploded directory will be removed and the webapp will be redeployed from the .WAR
  3. .WAR files will be deployed

Deploying on a running Tomcat server

It is possible to deploy web applications to a running Tomcat server.

If the Host autoDeploy attribute is "true", the Host will attempt to deploy and update web applications dynamically, as needed, for example if a new .WAR is dropped into the appBase. For this to work, the Host needs to have background processing enabled which is the default configuration.

autoDeploy set to "true" and a running Tomcat allows for:

  • Deployment of .WAR files copied into the Host appBase.
  • Deployment of exploded web applications which are copied into the Host appBase.
  • Re-deployment of a web application which has already been deployed from a .WAR when the new .WAR is provided. In this case the exploded web application is removed, and the .WAR is expanded again. Note that the explosion will not occur if the Host is configured so that .WARs are not exploded with a unpackWARs attribute set to "false", in which case the web application will be simply redeployed as a compressed archive.
  • Re-loading of a web application if the /WEB-INF/web.xml file (or any other resource defined as a WatchedResource) is updated.
  • Re-deployment of a web application if the Context Descriptor file from which the web application has been deployed is updated.
  • Re-deployment of dependent web applications if the global or per-host Context Descriptor file used by the web application is updated.
  • Re-deployment of a web application if a Context Descriptor file (with a filename corresponding to the Context path of the previously deployed web application) is added to the $CATALINA_BASE/conf/[enginename]/[hostname]/ directory.
  • Undeployment of a web application if its document base (docBase) is deleted. Note that on Windows, this assumes that anti-locking features (see Context configuration) are enabled, otherwise it is not possible to delete the resources of a running web application.

Note that web application reloading can also be configured in the loader, in which case loaded classes will be tracked for changes.

Deploying using the Tomcat Manager

The Tomcat Manager is covered in its own manual page.

Deploying using the Client Deployer Package

Finally, deployment of web application may be achieved using the Tomcat Client Deployer. This is a package which can be used to validate, compile, compress to .WAR, and deploy web applications to production or development Tomcat servers. It should be noted that this feature uses the Tomcat Manager and as such the target Tomcat server should be running.

It is assumed the user will be familiar with Apache Ant for using the TCD. Apache Ant is a scripted build tool. The TCD comes pre-packaged with a build script to use. Only a modest understanding of Apache Ant is required (installation as listed earlier in this page, and familiarity with using the operating system command shell and configuring environment variables).

The TCD includes Ant tasks, the Jasper page compiler for JSP compilation before deployment, as well as a task which validates the web application Context Descriptor. The validator task (class org.apache.catalina.ant.ValidatorTask) allows only one parameter: the base path of an exploded web application.

The TCD uses an exploded web application as input (see the list of the properties used below). A web application that is programmatically deployed with the deployer may include a Context Descriptor in /META-INF/context.xml.

The TCD includes a ready-to-use Ant script, with the following targets:

  • compile (default): Compile and validate the web application. This can be used standalone, and does not need a running Tomcat server. The compiled application will only run on the associated Tomcat X.Y.Z server release, and is not guaranteed to work on another Tomcat release, as the code generated by Jasper depends on its runtime component. It should also be noted that this target will also compile automatically any Java source file located in the /WEB-INF/classes folder of the web application.
  • deploy: Deploy a web application (compiled or not) to a Tomcat server.
  • undeploy: Undeploy a web application
  • start: Start web application
  • reload: Reload web application
  • stop: Stop web application

In order for the deployment to be configured, create a file called deployer.properties in the TCD installation directory root. In this file, add the following name=value pairs per line:

Additionally, you will need to ensure that a user has been setup for the target Tomcat Manager (which TCD uses) otherwise the TCD will not authenticate with the Tomcat Manager and the deployment will fail. To do this, see the Tomcat Manager page.

  • build: The build folder used will be, by default, ${build}/webapp/${path} (${build}, by default, points to ${basedir}/build). After the end of the execution of the compile target, the web application .WAR will be located at ${build}/webapp/${path}.war.
  • webapp: The directory containing the exploded web application which will be compiled and validated. By default, the folder is myapp.
  • path: Deployed context path of the web application, by default /myapp.
  • url: Absolute URL to the Tomcat Manager web application of a running Tomcat server, which will be used to deploy and undeploy the web application. By default, the deployer will attempt to access a Tomcat instance running on localhost, at http://localhost:8080/manager/text.
  • username: Tomcat Manager username (user should have a role of manager-script)
  • password: Tomcat Manager password.
好男人天堂网 久久精品国产这里是免费 国产精品成人一区二区 男人天堂网2021 男人的天堂在线观看 丁香六月综合激情 | 日本在线不卡视频| 日本特黄特色aa大片免费| 欧美国产日韩一区二区三区| 欧美日本二区| 九九精品久久久久久久久| 九九热国产视频| 国产一区二区精品久久91| 国产一区二区精品在线观看| 一级毛片视频免费| 成人高清护士在线播放| 久久99这里只有精品国产| 精品国产一区二区三区国产馆| 韩国毛片免费大片| 欧美激情一区二区三区在线 | 九九久久国产精品| 人人干人人草| 色综合久久天天综合| 午夜在线影院| 日韩免费在线观看视频| 亚洲精品影院| 四虎影视久久久| 日本特黄特色aaa大片免费| 国产麻豆精品视频| 亚洲 国产精品 日韩| 成人免费网站视频ww| 麻豆系列国产剧在线观看| 精品视频一区二区三区| 欧美1区| 日韩一级黄色片| 黄色短视频网站| 成人免费一级毛片在线播放视频| 成人免费观看网欧美片| 国产视频久久久| 国产不卡在线观看视频| 午夜激情视频在线播放| 日韩avdvd| 你懂的福利视频| 国产高清在线精品一区二区| 国产伦精品一区三区视频| 日本特黄一级| 亚洲 男人 天堂| 日本在线www| 欧美a级成人淫片免费看| 日本在线不卡视频| 国产网站在线| 一级女人毛片人一女人| 国产成人精品影视| 久久福利影视| 国产激情视频在线观看| 高清一级毛片一本到免费观看| 国产一区二区精品久| 你懂的日韩| 中文字幕一区二区三区精彩视频| 免费国产在线观看不卡| 日韩一级黄色| 午夜欧美成人久久久久久| 黄色福利片| 免费的黄视频| 精品视频免费看| 国产一级强片在线观看| 欧美一区二区三区性| 97视频免费在线| 亚欧乱色一区二区三区| 精品国产三级a| 九九免费高清在线观看视频| 欧美夜夜骑 青草视频在线观看完整版 久久精品99无色码中文字幕 欧美日韩一区二区在线观看视频 欧美中文字幕在线视频 www.99精品 香蕉视频久久 | 日韩av东京社区男人的天堂| 久久国产一区二区| 可以免费看污视频的网站| 国产一级生活片| 国产成a人片在线观看视频| 日本特黄特黄aaaaa大片| 欧美大片一区| 999精品在线| 成人高清免费| 国产伦久视频免费观看 视频 | 日日夜夜婷婷| 99热热久久| 久久福利影视| 精品久久久久久影院免费| 精品久久久久久免费影院| 午夜激情视频在线播放| 99久久精品国产高清一区二区 | 国产成+人+综合+亚洲不卡| 国产一区二区精品久| 久久精品免视看国产明星| 韩国妈妈的朋友在线播放| 国产网站免费| 九九精品在线播放| 日韩字幕在线| 精品国产一区二区三区免费| 亚欧乱色一区二区三区| 成人高清视频免费观看| 国产极品白嫩美女在线观看看| 日本特黄特色aa大片免费| 日本乱中文字幕系列| 高清一级片| 九九九在线视频| 麻豆网站在线免费观看| 亚洲天堂一区二区三区四区| 久久久成人影院| 成人影视在线播放| 日本特黄特色aaa大片免费| 精品视频免费在线| 91麻豆爱豆果冻天美星空| 日本在线不卡免费视频一区| 91麻豆精品国产综合久久久| 国产伦理精品| 国产一区二区精品久久91| 国产网站免费视频| 国产不卡在线观看视频| 日韩中文字幕一区| 日韩欧美一二三区| 九九精品久久| 国产一区二区高清视频| 青草国产在线| 四虎影视库| 九九久久国产精品| 日本在线不卡免费视频一区| 在线观看导航| 韩国三级香港三级日本三级la| 国产一区二区精品在线观看| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 精品视频在线看| 久久国产一久久高清| 日本伦理片网站| 免费一级片在线观看| 精品国产一区二区三区免费| 精品久久久久久综合网| 午夜激情视频在线播放| 国产a毛片| 国产成人精品在线| 日本特黄特色aaa大片免费| 99久久精品国产高清一区二区| 色综合久久手机在线| 久草免费在线观看| 999久久66久6只有精品| 天堂网中文字幕| 99久久精品国产高清一区二区 | 好男人天堂网 久久精品国产这里是免费 国产精品成人一区二区 男人天堂网2021 男人的天堂在线观看 丁香六月综合激情 | 国产精品1024永久免费视频| 黄色短视频网站| 国产韩国精品一区二区三区| 韩国毛片免费大片| 久久精品店| 青青青草影院| 黄视频网站免费观看| 久久久久久久网| 日韩中文字幕在线播放| 国产网站免费在线观看| 日日夜夜婷婷| 久草免费在线色站| 久久福利影视| 韩国妈妈的朋友在线播放| 日韩av片免费播放| 日本在线不卡免费视频一区| 久久久久久久免费视频| 日韩在线观看视频黄| 欧美1区| 青青久久精品| 精品美女| 日韩免费片| 午夜欧美福利| 日本免费区| 日本久久久久久久 97久久精品一区二区三区 狠狠色噜噜狠狠狠狠97 日日干综合 五月天婷婷在线观看高清 九色福利视频 | 欧美激情一区二区三区视频 | 精品视频在线观看一区二区 | 精品在线观看国产| 精品视频在线观看一区二区 | 精品国产香蕉伊思人在线又爽又黄| 99久久网站| 青青久久精品| 成人在激情在线视频| 国产国语对白一级毛片| 中文字幕一区二区三区精彩视频| 欧美另类videosbestsex高清| 日本在线www| 亚欧成人乱码一区二区| 美女免费黄网站| 欧美国产日韩久久久| 成人在激情在线视频| 国产精品免费精品自在线观看| 日本在线不卡免费视频一区| 免费毛片播放| 九九热国产视频| 韩国毛片基地| a级毛片免费观看网站| 久久福利影视| 欧美夜夜骑 青草视频在线观看完整版 久久精品99无色码中文字幕 欧美日韩一区二区在线观看视频 欧美中文字幕在线视频 www.99精品 香蕉视频久久 | 欧美日本免费| 99久久精品国产麻豆| 国产一区二区精品久久91| 久久99这里只有精品国产| 精品国产亚一区二区三区| 欧美1区| 欧美大片a一级毛片视频| 青青青草视频在线观看| 国产视频一区在线| 中文字幕一区二区三区精彩视频|