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:
- Click
File | New | Web Page. The New Web Page wizard opens.
- Name the JSP file and accept the default folder.
- In the Template list, ensure that you select a JSP enabled page template.
- 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.
- Adding data to a JSF page using data viewing components
- Adding page components to a JSF page
- Adding navigation components to a JSF page
- Adding input components to a JSF page
- Adding output components to a JSF page
- Adding panel components to a JSF page
- Adding behaviors to JSF components
- Adding Ajax components to a JSF page
- Adding sub tags to a JSF page
- Adding event handlers to a JSF component
- Adding custom components to a JSF page
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:
- Click
Options on the first page of the New Web Page wizard.
- In the Options list, click
JavaServer Faces then clear the
Use JavaServer Faces technology checkbox.