Download
FAQ
History
HomeHomeNext 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 and 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:

These targets use the Tomcat Web Application Manager, which is the manager Web application. You can use the Ant tasks to access the Tomcat Web Application Manager functionality, or you can access the tool directly. For example, to use the list task in the Tomcat Server Manager Tool, run the Manager Application in a browser:

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

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 Tomcat 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 the Tomcat manager Web application, you do not need to stop and restart Tomcat in order to update an application in the server. 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 redeploy the application. When using the Tomcat manager Web application, you do not need to stop and restart Tomcat in order to reinstall 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
Download
FAQ
History
HomeHomeNext 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.