The Java EE 7 Tutorial

Previous
Next

57.3 Running the Duke's Bookstore Case Study Application

You can use either NetBeans IDE or Maven to build, package, deploy, and run the Duke's Bookstore application.

57.3.1 To Build and Deploy Duke's Bookstore Using NetBeans IDE

  1. Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server).

  2. From the File menu, choose Open Project.

  3. In the Open Project dialog box, navigate to:

    tut-install/examples/case-studies
    
  4. Select the dukes-bookstore folder.

  5. Click Open Project.

  6. In the Projects tab, right-click the dukes-bookstore project and select Build.

    This will build, package, and deploy Duke's Bookstore to GlassFish Server.

57.3.2 To Build and Deploy Duke's Bookstore Using Maven

  1. Make sure that GlassFish Server has been started (see Starting and Stopping GlassFish Server), as well as the database server (see Starting and Stopping the Java DB Server).

  2. In a terminal window, go to:

    tut-install/examples/case-studies/dukes-bookstore/
    
  3. Enter the following command:

    mvn install
    

    This command builds the application and packages it in a WAR file in the tut-install/examples/case-studies/dukes-bookstore/target/ directory. It then deploys the application to GlassFish Server.

57.3.3 To Run Duke's Bookstore

  1. In a web browser, enter the following URL:

    http://localhost:8080/dukes-bookstore/
    
  2. 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.

  3. Use the pages in the application to view and purchase books.

Previous
Next