1. J2SE 1.4 or higher (Depending on the version used)
  2. Servlet 2.x
  3. JSP 2.x
Refer your web-server documentation for the JSP and Servlet API version information.
The Sun JSF implementation comes with two libraries one for API and other for Implementation. Just drop the libraries into the WEB-INF\lib folder of your web application.
Configuration Files
Create the faces-config.xml configuration file and configure it in the web.xml file. Below is the sample configuration of web.xml to plugin the JSF implementation.
<servlet-name>Faces Servlet</servlet-name>
<servlet-name>Faces Servlet</servlet-name>
Create properties files
Create the properties files and define the locale based messages. You can use the messages defined in the properties files directly in the JSF pages with simple declaration in the faces-config.xml file. Below is the sample declaration of the properties file.

Create JSF Pages
Write the jsp pages which will present the results of the web application. Use the tag libraries provided by the JSF implementation to design rich UI. Use the expression language of JSF (EL) to put the power of JSF into your application.
Below is the way of including the tag libraries in to your JSP page.
<%@taglib uri="" prefix="f" %>
<%@taglib uri="" prefix="h" %>

Create Managed-Beans
Managed Beans, also called as backing-beans, are standard Java POJO bean whose methods and properties are available to the JSF pages using the JSF Unified Expression Language(EL). Using managed beans, which are generally used as controllers in JSF, you can easily manage the communication between client and server. All the public methods and properties (using standard getter and setter methods) can be accessible using the EL in JSF pages.
Define the managed beans that are required for the controller logic of your application. And configure the beans in the faces-config.xml file. Below is the sample configuration of the managed beans.
Define Navigation Rules
Navigation rules tells the container to choose the specified page. The controller, i.e. the backing bean will return the name of the navigation rule which specifies the page to be rendered. This can be achieved by making the managed bean operation return the string containing the name of the navigation rule and the navigation rule with that name is defined in the faces-config.xml file. Here is the sample configuration.

Like it on Facebook, Tweet it or share this article on other bookmarking websites.