Download
FAQ
History
PrevHomeNext API
Search
Feedback
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 or reload the application. The tasks we defined in the build.xml file make it simple to deploy changes to both the JavaBeans component and the JSP page.

In the targets.xml file, we have included targets for the following Ant tasks that support iterative development. To view a listing of all targets for this application, enter ant -projecthelp.

These targets use the JWSDP Web Application Manager, which is the manager Web application. You can use the Ant tasks to access the JWSDP Web Application Manager functionality, or you can access the tool directly. For example, to view all of the applications currently installed on Tomcat, to start, stop, remove, or reload any of these applications, to install a WAR file located on the server, or to upload a WAR file to install, use the html version of the Application Manager. You can access the HTML version of the Manager by entering the following URL into a Web browser:

http://<host>:8080/manager/html 

You will be prompted for a user name and password. This can be 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, or it can be a user name and password combination that you've set up subsequent to installation as long as it has been assigned the role of manager. 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. For more information on using the JWSDP Web Application Manager, read Appendix B.

Modifying a JavaBeans Component

If you want to make changes to the JavaBeans component, you change the source code, recompile it, and reload the application onto Tomcat. When using Tomcat, its manager Web application enables you to update an application in the server without the need to stop and restart Tomcat. 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. Reinstall the ConverterBean component by typing ant reload.
  4. Reload the JSP page in the Web browser.

Modifying the Web Client

If you want to make changes to a JSP page, you change the source code and reload the application using the reload task. When using Tomcat, its manager Web application enables you to reinstall the changed Web client in the server without the need to stop and restart Tomcat. 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
Download
FAQ
History
PrevHomeNext API
Search
Feedback
Divider

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.