FAQ
History
PreviousHomeNext Search
Feedback
Divider

Deploying the Application

In this release of the Java WSDP, applications are deployed using the Ant tool. You must start Tomcat before you can install this application using the Ant tool. For further information on deploying Web applications, please read Deploying Web Applications.

Starting Tomcat

To start Tomcat, type the following command in a terminal window.

<JWSDP_HOME>/bin/startup.sh        (Unix platform) 
<JWSDP_HOME>\bin\startup          (Microsoft Windows) 

The startup script starts the task in the background and then returns the user to the command line prompt immediately. The startup script does not completely start Tomcat for several minutes.


Note: The startup script for Tomcat can take several minutes to complete. To verify that Tomcat is running, point your browser to http://localhost:8080. When the Tomcat splash screen displays, you may continue. If the splash screen does not load immediately, wait up to several minutes and then retry. If, after several minutes, the Tomcat splash screen does not display, refer to the troubleshooting tips in "Unable to Locate the Server localhost:8080" Error.


Documentation for Tomcat can be found at <JWSDP_HOME>/docs/tomcat/index.html.

Installing the Application using Ant

A Web application is defined as a hierarchy of directories and files in a standard layout. In this example, the hierarchy is accessed in an unpacked form, where each directory and file exists in the file system separately. This section discusses deploying your application using the Ant tool defined in Creating the Build and Deploy File for Ant.

A context is a name that gets mapped to the document root of a Web application. The context of the Getting Started application is /GSApp. The request URL http://localhost:8080/GSApp/index.html retrieves the file index.html from the document root. To install an application to Tomcat, you notify Tomcat that a new context is available.

You notify Tomcat of a new context with the Ant install task from the build.xml file. The Ant install task does not require Tomcat to be restarted, but an installed application is also not remembered after Tomcat is restarted. To permanently deploy an application, see Deploying Web Applications.

The Ant install task tells a Tomcat manager application to install an application at the context specified by the path attribute and the location containing the Web application files. Read Installing Web Applications for more information on this procedure. The steps for deploying this Web application follow.

  1. In a terminal window, go to the gs/ directory.
  2. Type the following command to deploy the Web application files:
  3. ant install

Divider
FAQ
History
PreviousHomeNext Search
Feedback
Divider

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