< Previous | Next >

Lesson 1.1: Setting up the workspace and creating a Web project

Creating a Web project

You must create a dynamic Web project to contain the Faces JSP file. You can create the Web project by following the proceeding steps:
  1. Click File > New > Other > Web > Dynamic Web Project. Click Next.
  2. Type JSPWebProject in the Name text field. Select your runtime from the Target Runtime list - if your preferred server is not listed you can click New and add the required information to configure it. For this tutorial Apache Tomcat 5.5 has been selected. In the Configurations field, select Faces Project from the list. Click Finish.
  3. If you are prompted to switch to the J2EE perspective, select Yes.

Adding Faces facets to the Web project

Facets define characteristics and requirements for J2EE projects. When you add a facet to a project, that project is configured to perform a certain task, fulfill certain requirements, or have certain characteristics.

If you selected Faces Project as the configuration when creating your dynamic Web project, the correct facets have already been added to your project. If you created a Web project without selecting that configuration, you need to add the correct facets to the project so that it supports Faces:

  1. Right-click your Web project and select Properties.
  2. From the list of properties select Project Facets > Add/Remove Project Facets.
  3. From the list of available facets, select:
    1. JSTL
    2. Base Faces Support
    Click Finish and then OK to exit the Properties window.

Setting the WS-I compliance level for the project

WS-I refers Web service interoperability; this includes interoperability across platforms, operating systems, and programming languages. The WS-I organization sets out standards collected in documents called Profiles that define the requirements needed to make a Web service interoperable. The Rational Developer products validate Web services against the WS-I Simple SOAP Binding Profile 1.0 (WS-I SSBP) and the WS-I Attachments Profile 1.0 (WS-I AP). For more information on WS-I, refer to their Web site: http://www.ws-i.org/

You can set the WS-I compliance level for an individual project or for all projects contained in your Workspace. The default WS-I compliance level is Suggest, which means that a warning is generated when a non WS-I compliant suggestion is made. In this tutorial, the Web service we are creating is not WS-I compliant, so we will set the level of WS-I compliance to Ignore for this project.
  1. Right-click JSPWebProject in the Project Explorer and click Properties.
  2. Click Profile Compliance and Validation from the list of preferences.
  3. Select Ignore WS-I compliance for both profiles, and click Apply and then OK.
The JSPWebProject will no longer generate WS-I compliance warnings, but any other projects in your workspace will retain their original WS-I compliance settings.

Lesson checkpoint

Now you are ready to begin Lesson 1.2: Create a Faces JSP file.

Feedback

< Previous | Next >