Simple integration of Tomcat and Ant

xiaoxiao2021-03-06  46

When developing a web application, you often use ant to build your web app, then depily to the appropriate Application Server, the entire process is inevitable. In fact, you can also integrate the work of deploy into Ant, and you can do your entire work by Ant. Here, take Tomcat as an example, expect to play the effect of bricking jade. First, to create a build.properties file, join the configuration below

Deploy.path = D: / Tools / Tomcat 5.0 / WebApps Tomcat.home = D: / Tools / Tomcat 5.0 Tomcat.manager.url = http: // localhost: 8080 / manager tomcat.manager.userName = admin tomcat.manager. Password = 88888888 Parameters are easy to understand for people who have used Tomcat, need to pay attention to "/" must not write "/". Then the modification of the build.xml file. How to write build.xml, I will not be here. After writing your build.xml, add deploy's Target, as follows:

Of course, you can also release WAR, using the Task of War. Finally, put the Catalina-ant.jar under $ {Tomcat} / server / lib in your classpath, add TOMCAT service in Build.xml to start the Tomcat service.

can now easily use AN t to complete our work. Ant Ant Deploy Antall Ant Start Ant List Everything should be able to see your app. If you want to release it again, just need

Ant Ant Deploy Ant Reload can re-release your web application. Note: I am using Tomcat 5.5, Ant1.5.4

转载请注明原文地址:https://www.9cbs.com/read-115973.html

New Post(0)