The JavaTM Web Services Tutorial
Home
TOC
PREV TOP NEXT

Modifying the Application

Since the Java Web Services Developer Pack is intended for experimentation, it supports iterative development. Whenever you make a change to an application, you must redeploy and reload the application.

Modifying a Class File

To modify a class file in a Java component, you change the source code, recompile it, and redeploy the application. For example, suppose that you want to change the exchange rate in the dollarToYen method of the Converter class:

  1. Edit Converter.java in the source directory.
  2. Recompile Converter.java by typing ant build.
  3. Redeploy Converter.java by typing ant deploy.
  4. Restart the Web application.
  5. Reload the JSP page in the Web browser.

Modifying the Web Client

To modify the Web client:

  1. Edit index.jsp in the source directory.
  2. Redeploy index.jsp by typing ant deploy.
  3. Reload the Web application.
  4. Reload the application in the Web browser.

Reloading the Application

You reload an application with the command:

http://localhost:8080/manager/reload?path=/target
 

This command invokes the manager Web application. Before you can use this application you must add your user name/password combination and associate the role name manager with it to <JWSDP_HOME>/conf/tomcat-users.xml, which can be edited with any text editor. This file contains an element <user> for each individual user, which might look something like this:

<user name="adeveloper" password="secret" roles="manager" />
 

The Tomcat reference documentation distributed with the Java WSDP contains information about the manager application.

Home
TOC
PREV TOP NEXT