Creating JPA-enabled web projects
JPA-enabled web projects hold all of the web resources that are used by your web application to access or modify data in a database.
Procedure
- In the Enterprise Explorer view, right-click and select New > Web Project.
- In the Name field, enter a name for your new web project.
- From the list of project templates, click one of the following
templates to use as a starting point to create your JPA-enabled web
project:
- Dojo Toolkit
- REST Services
- Simple
- JQuery
- In the Programming
Model section, specify one of the following programming models to
use when creating your project:
- To use Java™ EE technologies such as Servlets, JSPs, or JPA to develop your web application, click Java EE.
- To use Java EE technologies such as Servlets and JPA within the OSGi programming model, click OSGi.
- Click Next and from the list of available configuration options, click Deployment.
- From the Target
Runtime list, select the run time to use at build time
to compile your new web project. Note: If the target run time was previously set, this list is not available. Complete one of the following steps to make this list available:
- Specify a new EAR project name and then select a target run time.
- Select an existing EAR project from the list that uses the target run time that you want to use.
- Add the JPA (Java Persistence API) feature to your web project:
- Click Change Features.
- Select JPA and click OK. The JPA configuration is added to the list of available configuration options.
- From the list of available configuration options, click JPA.
- Create a connection profile that contains the connection
property information that is required to connect to a data source
in your enterprise:
- Click Add connection.
- From the list of Connection Profile Types, select your connection profile type and click Next.
- Complete the information that is required by the wizard to create a connection profile.
- Click Finish to return to the New Web Project wizard.
- Click Finish to create your web project.
Parent topic: Creating web projects

