Creating JPA enabled Web projects
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:
- In the Enterprise Explorer view, right-click and select
New | Other | Dynamic Web Project | Next
The New Dynamic Web Project wizard opens.
- In the Project name field, enter the name of your Web project.
- 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.
- In the Configuration section, click Modify.
- 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.
- Click OK | Next | Next
- In the JPA Facet page of the wizard, click
Add connection. The New Connection Profile dialog opens.
- Select your connection profile type from the list and click Next. The New Connection Profile wizard opens.
- Complete the information required by the wizard. Click Finish to return to the New Dynamic Web Project wizard.
- 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.