Duke's Bookstore Sample Application |
This document describes how to use the Duke's Bookstore sample application in conjunction with the Application Server.
The Duke's Bookstore sample application illustrates the tasks involved in programming using web technologies. The application allows users to retrieve available books from a database table, display details of the book, add books to and remove books from a shopping cart, and check out books. The application showcases web technologies such as servlets, monitoring servlet lifecycle events, and filters.
The bookstore sample and its associated files are kept under the samples/webapps/apps/bookstore directory
File | Description |
---|---|
bookstore
|
All files relating to bookstore sample. |
docs
|
docs for bookstore. |
common
|
common files, like sql. |
The bookstore sample has build.xml and deployment descriptors under the src directory. (e.g. bookstore/src).
To compile, assemble and deploy the application, see the Sample Application Build Facility document for details on using asant facility to quickly perform these tasks.
asant core
in the bookstore
directory.
asant clean
in the bookstore
directory.
bookstore
directory
asant deploy
. This deploys
the bookstore application. This also handles the creation of the jdbc datasource
for pointbase database.
Note: You must run asant undeploy
before
redeploying this sample. This will ensure that all modules are undeployed
and the resources are disabled.
bookstore
directory
asant undeploy
. This also
deletes the JDBC datasource for pointbase database.
To run the sample application, you must first:
You can then run the application by opening the following URL in your browser
http://<host>:<port>/bookstore/enter
The bookstore sample has build.xml
and deployment
descriptors under src
directory. (e.g. bookstore/)
The following images are from running the bookstore sample.
Generating Javadocs
To better understand sample application source code, you may refer
to the related Javadocs.
To generate Javadocs, run one of the following commands:
After you have generated Javadocs, you may access them at samples/webapps/apps/bookstore/javadocs/index.html.
If you encounter problems when running the application, try the following:
Last
Updated March 6, 2004