Saturday, June 19, 2010

A Beginner's Help Point to JSF Application using Eclipse IDE

Hi All

I started making use of the JSF application components and libraries to develop a web 2.0 UI making use of the latest technologies like Hibernate, Spring

I would like to share my experiences while learning these technologies.

To Start with, We need the following environment and libraries to start a JSF project

Environment :
1) JDK 1.5 or higher is fine
2) Eclipse IDE Eclipse Galileo,better 3.3 or higher version
3) JSF jar files (jsf-api.jar,jsf-impl.jar)
4) Apache Tomcat 6.0.18
5) JSP (tm) Standard Tag Library 1.2 implementation (jstl.jar)

Steps

1) Make the Web Page Editor the default editor for JSP pages

The JSF Tools Project-contributed Web Page Editor (WPE) is NOT registered as the default editor for JSP files. You can make the WPE the default editor for JSP files by following these steps:
• Navigate to "Window" -> "Preferences..." -> "General" -> "Editors" -> "File Associations"
• In the "File types" section, select "*.jsp"
• In the "Associated editors" section, select "Web Page Editor"
• Select the "Default" button

2) Register JSF libraries (jsf-api.jar,jsf-impl.jar)

We will be creating a library containing the Sun JSF Libraries
Select Windows->Preferences->Web and XML->->JavaServer Faces Tools->Libraries. Click on the New.. button to add a new library. Create the JSF Libraries as shown in the following figures



3) In similar fashion register the jstl libraries (jstl.jar)

4) In Eclipse, Create a new dynamic web application and in the options that come on the screen you can select the configuration as JSF v1.2 project which creates some dafult files required for any JSF Application
The screenshot that shows while configuring a dynamic web application is given below:



In a step to select libraries, provide the jsf libraries which we already created in earlier steps. Click Finish

Now the JSF Project Template is ready and you can start writing JSF Applications

Let me know if anyone faces any problem while configuring

more updates to come

Thank You
A Ram Prasad

No comments:

Post a Comment