Creating a JSF page

After you create a dynamic Web project that is enabled for JSF, you can create the JSF pages that are the Web pages in your project. A JSF page is a JSF enabled JSP file.

Before you create a JSF page create a Dynamic Web Project that is enabled for JSF technology. For more information, refer to Creating Faces enabled Web projects.

Note: When you create a JSF page, a Java™ page code file is automatically created. If you do not want to create a page code file, refer to Viewing page code for a Faces JSP file.

Remember: The terms JSF and Faces are used interchangeably. The phrases JSF page, Faces JSP, and JSF enabled JSP are used interchangeably. To create a JSF page:

  1. Click

    File | New | Web Page. The New Web Page wizard opens.

  2. Name the JSP file and accept the default folder.

  3. In the Template list, ensure that you select a JSP enabled page template.

  4. Click Finish.

After the JSP file opens in Page Designer, a Palette view opens next to the new JSF enabled JSP file. If you do not see the palette, click

Window | Show View | Basic | Palette. The Palette contains the JSF specific drawers that contain all of the JSF components that you can drag and drop on your JSP file. Using the data components from the Data and Services drawer, you can connect to a data source and add the JSF components that enable your users to create, read, update, and delete data.

For more information on adding specific JSF components from the palette to your page, refer to the online help.

Remember: When you run your JSF enabled JSP file on a server, the browser address bar displays the filename with a .faces extension rather than a .jsp extension.

Tip: If you want to create a non-JSF JSP in a Faces enabled Web project:

  1. Click

    Options on the first page of the New Web Page wizard.

  2. In the Options list, click

    JavaServer Faces then clear the

    Use JavaServer Faces technology checkbox.