Java Reference
In-Depth Information
The instructions for building, deploying, and running the example are the same for
the original customer example and for the modified version using this proced-
ure.
Running the customer Example
You can use either NetBeans IDE or Ant to build, package, deploy, and run the custom-
er application.
To Build, Package, and Deploy the customer Example Using NetBeans IDE
This procedure builds the application into the tut-install /examples/jax-rs/cus-
tomer/build/web/ directory. The contents of this directory are deployed to the
GlassFish Server.
1. From the File menu, choose Open Project.
2. In the Open Project dialog, navigate to:
tut-install /examples/jaxrs/
3. Select the customer folder.
4. Select the Open as Main Project check box.
5. Click Open Project.
It may appear that there are errors in the source files, because the files refer to
JAXB classes that will be generated when you build the application. You can ig-
nore these errors.
6. In the Projects tab, right-click the customer project and select Deploy.
To Build, Package, and Deploy the customer Example Using Ant
1. In a terminal window, go to:
tut-install /examples/jaxrs/customer/
2. Type the following command:
ant
This command calls the default target, which builds and packages the applica-
tion into a WAR file, customer.war , located in the dist directory.
3. Type the following command:
ant deploy
Typing this command deploys customer.war to the GlassFish Server.
Search WWH ::




Custom Search