Running the Duke’s Bookstore Case Study Application
You can use either NetBeans IDE or Ant to build, package, deploy, and run the Duke’s Bookstore application.
To Build and Deploy Duke’s Bookstore Using NetBeans IDE
Before You Begin
You must have already configured GlassFish Server as a Java EE server in NetBeans IDE, as described in To Add GlassFish Server as a Server in NetBeans IDE.
- From the File menu, choose Open Project.
- In the Open Project dialog, navigate to:
tut-install/examples/case-studies/
- Select the Open as Main Project check box.
- Click Open Project.
- Right-click dukes-bookstore in the project pane and select Deploy.
This will build, package, and deploy Duke’s Bookstore to the GlassFish Server, starting the Java DB database and GlassFish Server if they have not already been started.
To Build and Deploy Duke’s Bookstore Using Ant
Before You Begin
Make sure the GlassFish Server is started as described in Starting and Stopping the GlassFish Server and the Java DB server is started as described in Starting and Stopping the Java DB Server.
- In a terminal window, go to:
tut-install/examples/case-studies/dukes-bookstore/
- Type the following command:
ant all
This command builds, packages, and deploys Duke’s Bookstore to the GlassFish Server.
To Run Duke’s Bookstore
- In a web browser, type the following URL:
http://localhost:8080/dukesbookstore/
- On the Duke’s Bookstore main page, click a book in the graphic, or click one of the links at the bottom of the page.
- Use the pages in the application to view and purchase books.