Creating JPA enabled Web projects

 

+

Search Tips   |   Advanced Search

 

JPA enabled Web projects hold all of the Web resources used by your Web application to access or modify data in a database.

To create a JPA enabled Web project:

  1. In the Enterprise Explorer view, right-click and select

    New | Other | Dynamic Web Project | Next

    The New Dynamic Web Project wizard opens.

  2. In the Project name field, enter the name of your Web project.

  3. Select a Target Runtime from the drop down list.

    This field will be disabled if a target runtime had been previously set. To enable this field, you can do one of the following:

    • Specify a new EAR Project Name then select a Target Runtime.

    • Select an existing EAR project from the list that uses the target runtime that you want to use.

  4. In the Configuration section, click Modify.

  5. In the Project Facets page of the wizard, click Java Persistence.

    Tip: If you want to use generate UI on your Web pages, ensure that you also select the following JSF facets:

    • JavaServer Faces (IBM Compatibility)
    • JavaServer Faces (IBM Enhanced)
    • JavaServer Faces
    • JSTL

    For more information about JSF facets, refer to JSF Facets.

  6. Click OK | Next | Next
  7. In the JPA Facet page of the wizard, click

    Add connection. The New Connection Profile dialog opens.

  8. Select your connection profile type from the list and click Next. The New Connection Profile wizard opens.

  9. Complete the information required by the wizard. Click Finish to return to the New Dynamic Web Project wizard.

  10. On the JPA Facet page of the New Dynamic Web Project wizard, click Finish.

For more information on creating a dynamic Web project, refer to Creating dynamic Web projects.