Download
FAQ History |
![]() ![]() ![]() |
API
Search Feedback |
About the Examples
The Java WSDP 1.2 release includes four complete, working examples, which are located in the
<
JWSDP_HOME
>/jsf/samples
directory. Table 21-1 lists the examples and where they are located.This tutorial uses the
cardemo
andguessNumber
to explain JavaServer Faces technology. It also uses some extra code snippets not contained incardemo
orguessNumber
to explain features not demonstrated by these applications.
Running the Examples Using the Pre-Installed XML Files
The Java WSDP 1.2 includes an XML file for each example application in the
<
JWSDP_HOME
>/webapps
directory. This file causes an application to be automatically deployed when you start Tomcat. To run an example that is already deployed:
- Add the following to the front of your PATH:
- On a system running the Solaris or Linux operating system, go to the
<
JWSDP_HOME
>/bin
directory and execute thecatalina.sh
script to bring up the Java WSDP. On a system running Microsoft Windows, from the Start menu, select ProgramsJava Web Services Developer Pack
Start Tomcat.
- Once the server is up and running, point your browser to
http://localhost:8080
, the default port at which the process is running. The page that is displayed contains links to several sample programs and administration tools.- Click on one of the links to run the corresponding example.
Building and Running the Sample Applications Manually
It is also possible to build each of the sample applications manually. Before doing so, you need to set the environment variables, as described in Running the Examples Using the Pre-Installed XML Files and edit your
build.properties
file.To edit the
build.properties
file:
- Go to the
<
JWSDP_HOME
>/jsf/samples
directory.- Copy
build.properties.sample
tobuild.properties
. This file provides build properties for all of the samples.- In
build.properties
, settomcat.home
toJWSDP_HOME
.- Set the username and password to the username and password you configured for the user who has the manager role in the Java WSDP.
To build a sample:
- Shutdown Tomcat if it's running by executing either
catalina.sh stop
if you are running the UNIX operating system orcatalina stop
, if you are running Windows.- Move the pre-installed XML files out of the
<
JWSDP_HOME
>/webapps
directory.- Go to the directory of the example you want to build.
- At the command line, run Ant with no target:
ant
- This will cause the sample to be built, and the WAR file for the sample to be put into the
<
JWSDP_HOME
>/jsf/samples
directory. The existing pre-installed XML files will cause tomcat to find your newly compiled sample.
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.