How to Use the autoDeploy Attribute in Apache Tomcat (Windows)

See Apache: Tips and Tricks for similar articles.
Looking to improve your Apache Web Server skills? Check out Webucator’s Apache Web Server classes.

When we copy a WAR file to the application base directory of Apache Tomcat, we usually expect the web application to be deployed. In other words, we expect the website to be immediately available on the World Wide Web. However, this doesn't always have to be the case. The autoDeply attribute on the Host element determines if the web application will be available for access on the internet.

To learn how to use the autoDeploy attribute in Apache Tomcat, follow these two steps:

  1. Open a text editor session on CATALINA_BASE/conf/server.xml,e.g., c:/Tomcat8/conf/server.xml.
  2. Locate the Host element using your editor's search facility. The entry will look similar to the following:
    <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true">
    	
    Note that the autoDeply attribute is set to true. As you would imagine, this setting indicates that a WAR file or a context file that is copied to Tomcat will be made available for processing. This is to say, the web application will be deployed. If you set the value to false and then restart the Tomcat server, the web applications will not be deployed. In order to deploy the web applications so that the outside world can use them, you will have to use either the Tomcat manager web application or JMX beans.

Related Articles

  1. How to Start and Stop Apache Tomcat from the Command Line (Windows)
  2. How to Deploy a WAR File to Apache Tomcat (Windows)
  3. How to Start and Stop Apache Tomcat from the Command Line (Linux)
  4. How to Deploy a WAR File to Apache Tomcat (Linux)
  5. How to Run a JSP Program in Apache Tomcat (Windows)
  6. How to Check the Status of the Apache Tomcat Server (Windows)
  7. How to Deploy a Web Application Using the Apache Tomcat Manager (Windows)
  8. How to Check the Status of the Apache Tomcat Server (Linux)
  9. How to Set Default Context Path in Apache Tomcat (Windows)
  10. How to Use the autoDeploy Attribute in Apache Tomcat (Windows) (this article)
  11. How to Deploy a Web Application Using the Apache Tomcat Manager (Linux)
  12. How to List Deployed Applications Using the Apache Tomcat Manager (Windows)
  13. How to Run Multiple Instances of Apache Tomcat on One Server (Windows)
  14. How to Run a JSP Program in Apache Tomcat (Linux)
  15. How to Establish a JDBC Connection in Apache Tomcat (Windows)
  16. How to Verify Apache Tomcat Server Operation (Windows)
  17. How to Cluster in Apache Tomcat (Linux)
  18. How to Undeploy Web Applications Using the Apache Tomcat Manager (Windows)
  19. How to Set Default Context Path in Apache Tomcat (Linux)
  20. How to Use the Java Logging API in Apache Tomcat (Windows)
  21. How to Cluster in Apache Tomcat (Windows)
  22. How to Use the Java Logging API in Apache Tomcat (Linux)
  23. How to Use the autoDeploy Attribute in Apache Tomcat (Linux)
  24. How to Configure Apache Tomcat to Use MBeans (Windows)
  25. How to List Deployed Applications Using the Apache Tomcat Manager (Linux)
  26. How to Install and Configure Apache Tomcat (Windows)
  27. How to Configure Apache Tomcat to Use MBeans (Linux)