Creating web projects

Web projects hold all of the web resources that you create, maintain, and use as you develop your web application. The web project is the environment where you perform activities such as link-checking, building, testing, and publishing.

About this task

Use the Web Project wizard to create web projects. The following project templates are available in the Web Project wizard:
  • Dojo Toolkit
  • Java Server Faces
  • REST Services
  • Simple
You can use the Simple project template to create any type of web project by adding features.
Tip: To keep the configuration requirements to a minimum, use the project template that is most similar to the type of web project you want to create.
The following programming models are available for use when creating web projects:
Java EE
Select this option if you intend to use Java EE technologies such as Servlets, JSPs, or JPA to develop your web application.
Client-side only (HTML, JavaScript)
Select this option if you intend to use only Javascript, HTML, Dojo, and CSS to develop your web application. Server-side programming is not available with this option.
OSGi
Select this option if you intend to use Java EE technologies, such as Servlets and JPA, within the OSGi programming model.
The following table lists the different types of web projects that you might want to create. The project template and available programming models to use when creating these web projects are also provided.
Table 1. Web projects
Type of web project Project template to use Available programming models
Projects for mobile devices Dojo Toolkit
  • Java EE
  • Client-side only (HTML, JavaScript)
JPA-enabled projects
  • Dojo Toolkit
  • Java Server Faces
  • REST Services
  • Simple
  • Java EE
  • OSGi
Facelet-enabled projects (JSF 2.0) Java Server Faces
  • Java EE
  • OSGi
Faces JSP-enabled projects (JSF 1.x) Java Server Faces
  • Java EE
  • OSGi
Web 2.0-enabled projects
  • Simple
  • Dojo Toolkit
  • Java EE
  • Client-side only (HTML, JavaScript)
    Note: The Client-side only programming model is not available for some of the Web 2.0 features. For example, it is not available for Ajax Proxy and Server-side Tech.
  • OSGi
Projects that can access remote Ajax services Simple Java EE
Dojo-enabled projects Dojo Toolkit
  • Java EE
  • Client-side only (HTML, JavaScript)
Communications-enabled projects Simple
  • Java EE
  • Client-side only (HTML, JavaScript)
Server side technologies-enabled projects Simple Java EE
Struts-enabled projects Simple Java EE

Procedure

  1. Open the J2EE or Web perspective.
  2. In the Enterprise Explorer view, right-click and select New > Web Project.
  3. In the Name field, enter a name for your new web project.
  4. From the list of project templates, select the project template to use when creating your web project.
  5. In the Programming Model section, specify which of the available programming models to use when creating your web project.
    Tip: The Programming Model section is displayed only if there is more than one programming model available for use with the selected project template.
  6. Click Next and complete the information required by the wizard to configure your new web project.

Feedback