A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.oracle.com/javaee/7/tutorial/dukes-tutoring004.htm below:

58.4 Running the Duke's Tutoring Case Study Application

Java Platform, Enterprise Edition: The Java EE Tutorial

58.4 Running the Duke's Tutoring Case Study Application

This section describes how to build, package, deploy, and run the Duke's Tutoring application.

58.4.1 Running Duke's Tutoring

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

58.4.1.1 To Build and Deploy Duke's Tutoring 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 Using NetBeans IDE.

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

  2. If the database server is not already running, start it as described in Starting and Stopping the Java DB Server.

  3. From the File menu, choose Open Project.

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

    tut-install/examples/case-studies
    
  5. Select the dukes-tutoring folder.

  6. Select the Open Required Projects check box and click Open Project.

    Note:

    The first time you open Duke's Tutoring in NetBeans, you will see error glyphs in the

    Projects

    tab. This is expected, as the metamodel files used by the enterprise beans for Criteria API queries have not yet been generated.

  7. In the Projects tab, right-click the dukes-tutoring project and select Build.

    This command creates a JDBC security realm named tutoringRealm, builds and packages the dukes-tutoring-common and dukes-tutoring-war projects, and deploys dukes-tutoring-war to GlassFish Server, starting the Java DB database and GlassFish Server if they have not already been started.

58.4.1.2 To Build and Deploy Duke's Tutoring Using Maven
  1. Make sure that GlassFish Server has started (see Starting and Stopping GlassFish Server).

  2. If the database server is not already running, start it as described in Starting and Stopping the Java DB Server.

  3. In a terminal window, go to:

    tut-install/examples/case-studies/dukes-tutoring/
    
  4. Enter the following command:

    mvn install
    

    This command creates a JDBC security realm named tutoringRealm, builds and packages the dukes-tutoring-common and dukes-tutoring-war projects, and deploys dukes-tutoring-war to GlassFish Server.

58.4.1.3 Using Duke's Tutoring

Once Duke's Tutoring is running on GlassFish Server, use the main interface to experiment with checking students in and out or sending them to the park.

To Use the Main Interface of Duke's Tutoring

  1. In a web browser, open the main interface at the following URL:

    http://localhost:8080/dukes-tutoring-war/
    
  2. Use the main interface to check students in and out, and to log when the students go to the park.

To Use the Administration Interface of Duke's Tutoring

Follow these instructions to log in to the administration interface of Duke's Tutoring and add new students, guardians, and addresses.

  1. From the main interface, open the administration interface by clicking Administration main page in the left menu.

    This redirects you to the login page at the following URL:

    http://localhost:8080/dukes-tutoring-war/admin/index.xhtml
    
  2. On the login page, enter admin@example.com in the User name field, and enter javaee in the Password field.

  3. Use the administration interface to add or modify students, add guardians, or add addresses.

The administration interface is not fully implemented. It is not possible to edit a guardian or to view or edit an address, although Facelets pages exist for these features. The application also makes no use of the properties in the PersonDetails entity. Feel free to modify the application to add these features.

Table of Contents Java Platform, Enterprise Edition: The Java EE TutorialExpand

|

Collapse

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3