< Previous | Next >

 

Lesson 1.7: Run the Web application to test the entities

In this lesson you will learn how to run the Web application on the server.

Before you begin, complete the lesson Lesson 1.6: Create JPA manager beans.

Note: If your runtime target is WAS, Version 7.0, then there will be errors in the Problems view regarding annotations not being recognized. For example, The annotation PersistenceUnit will not be recognized by WAS v7.0 runtimes. Set the UseEJB61FEPScanPolicy custom property to true in the MANIFEST.MF file for this module. You must correct these problems before you can run the Web project on the server.

To fix the problems, do the following steps:

To run the Web project on the server:

  1. In the Enterprise Explorer view, expand

    JPATutorial | Webcontent.

  2. Right-click the index.jsp file, and click

    Run As | Run on Server.

  3. A Web browser opens and displays the Employee List application.

The Employee List application demonstrates the use of Java™ Persistent API (JPA) to access employee data. The application maps persistent entities to columns in a database table and presents the information on a Web site, where users can create, read, update, and delete data.

 

Lesson checkpoint

Congratulations! You have completed this tutorial.

< Previous | Next >