You are on page 1of 7

@chaeya

"$CATALINA_BASE/conf/server.xml" "$CATALINA_BASE/conf/[EngineName]/[HostNa me]/[ApplicationName].xml" "$CATALINA_BASE/webapps/[ApplicationName]/ META-INF/context.xml" Uncompressed (exploded) applications located in the appBase without Context Descriptors. docBase applications that are compressed in WAR files, along with WARs associated with an existing application, which will be used to automatically redeploy the application.

Host autoDeploy The most recent versions of Tomcat support a number of hot deployment features right out of the box. These features are enabled on a per-Host basis, by setting the "autoDeploy" attribute to "true". Here are some of the things you can do once you've enabled hot deployment: * Automatically deploy exploded or compressed applications by placing them in the appBase * Re-deploy existing applications by copying an updated WAR file into the appBase * Use WatchedResource elements to initiate application redeploy whenever the defined resource is updated (for example, WEB-INF/web.xml) For a complete list of autoDeploy-enabled hot deploy features, visit the Apache project website.

Deployment with Tomcat Manager The Tomcat Manager is a lightweight administrative tool included with all standard distributions of Apache Tomcat, that provides a wide variety of deployment functionalities, including a number of hot deployment commands. Manager commands are sent in a standard URI format, as follows: http://[host]:[port]/manager/[command]?[parameters] Using the Manager, you can deploy an application to a running Tomcat server from pretty much anywhere - there are usages for remote deployment, local path deployment, deployment from WAR, deployment from the appBase, and even deployment by calling a context.xml file that provides a docBase path. Manager can also remotely reload, undeploy (careful, this means delete), start, and stop applications.

Deployment with the Tomcat Client Deployer The Tomcat Client Deployer (TCD) is a multi-component Java package that uses a variety of technologies to validate, compile, compress, and deploy your web applications. TCD is basically a bundle of Ant tasks that execute functions of the Jasper JSP Engine, JDK, and Catalina engine (including the Tomcat Manager) to quickly move applications from your hard drive to your running Tomcat server. TCD is not included with standard distributions of Tomcat. You can download it separately from the Tomcat project site. You can decompress it anywhere you want; it doesn't need to be in a Tomcat directory. If you haven't installed it already, you'll also need to download and install Apache Ant in order for TCD to run. Note that a configured, running instance of the Tomcat Manager application is required for TCD to work. Once you have configured this file, run TCD with the included Ant script. The default target, "compile", will validate and compile the web application as a WAR file at the specified "build" location. Other targets with self-explanatory features include deploy, undeploy, start, reload, and stop.

Hot Deployment to Tomcat with an IDE Configure your IDE to recognize Tomcat as a server environment. Thanks to Tomcat's popularity, most IDEs offer plug-ins adding Tomcat support to their environment. For an example of this, check out Tomcat Eclipse, our simple, illustrated guide to using Tomcat in conjunction with the popular Eclipse IDE. Give your IDE write-access to your application's "WEBINF/classes" directory. Configure Tomcat to reload classes when they are changed, by setting the "reloadable" attribute to "true" for the relevant Context and Web-App elements in your Tomcat configuration files. Etc : Tcat

You might also like