Download FAQ History |  | API Search Feedback

> ## Running Manager Commands Using Ant Tasks

> The version of `Ant` distributed with the Java WSDP supports tasks that invoke `manager` commands, thus allowing you to run the commands from a terminal window. The tasks are summarized in Table B-2.

> Table B-2 Ant Web Application Manager Tasks
> Function | Ant Task Syntax
> --- | ---
> list | `<list url="``url``" username="``username``" password="``password``" />`
> install | `<install url="``url``" path="``mywebapp``" war="" username="``username``" password="``password``" />` The value of the `war` attribute can be a WAR file (`jar:file:/``path``/``to``/``mywebapp``.war!/)` or an unpacked directory (`file:/``path``/``to``/``mywebapp``).`
> reload | `<reload url="``url``" path="``mywebapp``" username="``username``" password="``password``" />`
> deploy | `<deploy url="``url``" path="``mywebapp``" war="file:/``path``/``to``/``mywebapp``.war" username="``username``" password="``password``" />`
> undeploy | `<undeploy url="``url``" path="``mywebapp``" username="``username``" password="``password``" />`
> remove | `<remove url="``url``" path="``mywebapp``" username="``username``" password="``password``" />`

> Note: An application that is installed is not available after Tomcat is restarted. To make an application permanently available, use the `deploy` task.

> Since a user of the `manager` is required to be authenticated, the `Ant` tasks take `username` and `password` attributes in addition to the URL. Instead of embedding these in the `Ant` build file, you can use the approach followed by the tutorial examples. You set the `username` and `password` properties in a file named `build.properties` in the directory `<``INSTALL``>/examples/common` as follows:

>     username=ManagerName
>     password=ManagerPassword

> Replace `ManagerName` and `ManagerPassword` with the values you specified for the user name and password when you installed the Java WSDP.

> The `Ant` build files import these properties with the following element:

>     <property file="../common/build.properties"/>

> The document Manager App HOW-TO, distributed with the Java WSDP at <`JWSDP_HOME>``/docs/tomcat/manager-howto.html`, contains reference information about the Ant tasks application.

Download FAQ History |  | API Search Feedback

All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.