Download
FAQ History |
![]() ![]() ![]() |
API
Search Feedback |
Packaging Web Applications
A Web application must be packaged into a WAR in certain deployment scenarios and whenever you want distribute the Web application to an external enviroment.
You package Web application into a WAR by executing the
jar
command in a directory laid out in the format of a Web module or by using theAnt
war
task. This tutorial uses the second approach. To build and package thehello1
application into a WAR namedhello1.war
:
- In a terminal window, go to
<
INSTALL
>/jwstutorial13/examples/web/hello1/
.- Run
ant
build. This target will spawn any necessary compilations and copy files to the<
INSTALL
>/jwstutorial13/examples/web/hello1/build/
directory.- Run
ant
package
. This target creates a WAR in the directory<
INSTALL
>/jwstutorial13/examples/web/hello1/dist/
.A sample
hello1.war
is provided in<
INSTALL
>/jwstutorial13/examples/web/provided-wars/
.
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.