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.
1 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:
-
Edit Converter.java in the source directory.
-
Recompile Converter.java by typing antbuild.
-
Redeploy Converter.java by typing antdeploy.
-
Restart the Web application.
-
Reload the JSP page in the Web browser.
2 Modifying the Web Client
To modify the Web client:
-
Edit index.jsp in the source directory.
-
Redeploy index.jspby typing antdeploy.
-
Reload the Web application.
-
Reload the application in the Web browser.
3 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.
|