Duke's Bookstore Sample Application

  Samples Index



Duke's Bookstore Sample Application


This document describes how to utilize the Duke's Bookstore sample application in conjunction with the Application Server.

This sample application document contains the following sections:



Overview

The Duke's Bookstore sample application illustrates the tasks involved in programming using web Technologies. Dukesbank application allows users to retrieve available books from a database table, displays details of the book, add and remove books to a shopping cart and check out the books. The Duke's Bookstore example showcases different web technologies in the following application:


Directory Structure

The bookstore sample and its associated files are kept under the samples/webapps/bookstore directory
File

Description

bookstore1

All files relating to bookstore1 sample.

docs

docs for bookstore1.

common

common files, like sql.

The bookstore sample has build.xml and deployment descriptors under the src directory. (e.g. bookstore1/src).



Compiling and Assembling the Application



This section contains instructions to build and assemble the Duke's Bookstore sample application.

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.



NOTE: You must start the Database.


Please ensure that the database is started, (see How to start Database) before proceeding with deploying and running the sample application.


Deploying the Sample Application

In this section, you will learn how to deploy the Duke's Bookstore sample application.

To deploy the application, do the following:




Note You must run asant undeploy before redeploying this sample. This will ensure that all modules are undeployed and the resources are disabled.



To undeploy the application, do the following:


Running the Sample Application



In order to run the sample application, you must first do the following:

You are now ready to run the sample application by doing the following.

The bookstore sample has build.xml and deployment descriptors under src directory. (e.g. bookstore1/src)

The following images are from running the bookstore1 sample.



Figure 1    Duke's Bookstore: "Start Shopping" link



Figure 2    Duke's Bookstore: Shopping Cart



Figure 3    Duke's Bookstore: Cashier


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:

asant javadocs

or

asant all

After javadocs are generated, you may access them at samples/webapps/bookstore/bookstore1/javadocs/index.html.



Troubleshooting





Copyright © 2003 Sun Microsystems, Inc. All rights reserved.

Last Updated February 10, 2004