Download
FAQ History |
![]() ![]() ![]() |
API
Search Feedback |
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 followingAnt
tasks:
ant
list
--use this task to view a list of all applications currently available on Tomcat.ant
install
--use this task to copy thebuild
directory to<JWSDP_HOME>
/webapps
and notify Tomcat that the new application is available. The install task can reference either an unpacked directory or a WAR file.ant
reload
--use this task to update an application in the server when the application was initially installed using theAnt
install
task.ant
remove
--use this task to take an installed Web application out of service.ant
deploy
--use this task to permanently deploy a context to Tomcat while Tomcat is running. Thedeploy
task requires a WAR.ant
undeploy
-- use this task to take a deployed application out of service.These targets use the Tomcat Web Application Manager, which is the
manager
Web application. You can use theAnt
tasks to access the Tomcat Web Application Manager functionality, or you can access the tool directly. For example, to use thelist
task in the Tomcat Server Manager Tool, run the Manager Application in a browser: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 ofmanager
. 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 theyenRate
property of theConverterBean
component: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:
Download
FAQ History |
![]() ![]() ![]() |
API
Search Feedback |
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.