Adding a JSF facet to a Web application

The JSF facets supply a set of behaviors and capabilities to your Web application. In order to use the JSF tools the JSF facets and any other facet dependencies must be added to your project.
When a Web application is Faces enabled, it means that one or more JSF facets have been added to the project. There are three ways to enable Faces technology in a Web application:

To add a JSF facet to an existing Web application:

  1. In the Project Explorer view, right-click your Web project and select Properties.
  2. In the Properties list, click Project Facets.
  3. Click Add/Remove Project Facets.
  4. Select the JSF facets Base Faces support, Enhanced Faces components, and JSTL, then click Finish. If the facet you select is dependent on other project facets you will be prompted to select the required facets.
When a JSF facet is added to a Web application, the following occurs:
  • The JSF library JARs and other project resources (for example CSS files and images) are copied into the project.
  • The project's Web Deployment Descriptor (web.xml) is updated ensuring that the Faces Servlet is present along with the user's specification for:
    • Faces Servlet Name
    • Faces Servlet URL Mappings
    • Context Params for application configuration file
  • An empty Faces configuration file using the name and location specified by the user is created. If a file with that name already exists at that location, this step is skipped.

An implementation JSF Library must be specified so that the "Run on Server" of a JSF JSP page is possible.

Related concepts
JSF Facets
Developing Faces (JSF) applications

Feedback