The JavaTM Web Services Tutorial
Home
TOC
Index
PREV TOP NEXT
Divider

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. The tasks we defined in the build.xml file make it simple to deploy changes to both the ConverterBean and the JSP page.

In the build.xml file, we set up a target to install the application on the running Tomcat server and a target to reload the application onto the running Tomcat server. These tasks are accomplished using the Tomcat Server Manager Tool, which is the manager Web application. You may use the user name/password combination that you set up during Java WSDP installation because it will have the role name of manager associated with it. If you've forgotten the user name/password combination that you set up during installation, you can look it up in <JWSDP_HOME>/conf/tomcat-users.xml, which can be viewed with any text editor.

The Tomcat reference documentation distributed with the Java WSDP contains information about the manager 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. When using the Tomcat manager Web application, you do not need to stop and restart Tomcat in order to redeploy the changed application. For example, suppose that you want to change the exchange rate in the yenRate property of the ConverterBean component:

  1. Edit ConverterBean.java in the source directory.
  2. Recompile ConverterBean.java by typing ant build.
  3. Redeploy ConverterBean.java by typing ant reload.
  4. Reload the JSP page in the Web browser.

Modifying the Web Client

To modify a JSP page, you change the source code and redeploy the application.When using the Tomcat manager Web application, you do not need to stop and restart Tomcat in order to redeploy the changed Web client. For example, suppose you wanted to modify a font or add additional descriptive text to the JSP page. To modify the Web client:

  1. Edit index.jsp in the source directory.
  2. Reload the Web application by typing ant reload.
  3. Reload the JSP page in the Web browser.
Divider
Home
TOC
Index
PREV TOP NEXT
Divider

This tutorial contains information on the 1.0 version of the Java Web Services Developer Pack.

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.