Setting up Facelets Development Environment - Part 2
Likewise, create User Libraries
- JSTL and add jstl1.2.jar
- Facelets and add jsf-facelets.jar
Download the latest Facelets distribution and unzip it into a folder. You can find the jsf-facelets.jar in the folder.
You can see the defined user libraries as shown below.
Create a JSF project
Select File -> New -> Project. Select Dynamic Web project in the Wizard, and click Next. Give Project name JSFFaceletsExample. Click New button to select the 'Target Runtime'. In the popup window(screen shot is not provided) select the type of runtime environment as ApacheTomacat v6.0. Specify the tomcat installation directory and click Finish. Select the dynamic web module version as 2.5. In the configuration section, select the Facelet1.0 Project. Click Next
Click Next twice.
Select all the three libraries as shown and click Next.
Select deployment descriptor configuration as shown in figure and click Finish.
Your JSFFaceletsExample has been created. Note that the web.xml file has been updated with the Faces Servlet and servlet-mapping, a JSF application configuration file (faces-config.xml) has been created, and the build path has been updated with the implementation jars. In your eclipse window, project explorer will look like this:
Let's examine the faces-config.xml and web.xml in detail. (Click 'Next' below to continue..)
Back To Top>