A Technology Blog About Code Development, Architecture, Operating System, Hardware, Tips and Tutorials for Developers.

Sunday, September 26, 2010


8:33:00 PM Posted by Satish Kumar , , , , No comments

This tutorial was developed with Java 1.6, JavaServerFaces 1.2, the Apache MyFaces JSF implementation, Tomcat 6.0 and Eclipse 3.5.

Eclipse & Tomcat

For JSP development you need the Eclipse and an installed Tomcat.
JSF library

A JSF library is required. We will later use Eclipse to download and install the Apache MyFaces JSF implementation during project creation.

JSLT library

Download the JSLT library from https://jstl.dev.java.net/.

JSF Project

Create JSF Project

Create a new Dynamic Web Project "JSF". 
Under "Configuration" select "JavaServer Faces v1.2".

Press next until you see the following screen. The JSF and JSTL is showing in the next screen, because I have already configured to my eclipse. For the first time nothing will be there. 

The first time you create a JSF project you need to install / download a JSF implementation. Press the "Download library..." button and select the Apache Library and install it.

Press Manage libraries and create a library for JSTL.

Press new now.

Add the two downloaded JSTL jars and press OK.

Check JSTL and click Finish.

Review the "web.xml" file. It has an entry for the Faces Servlet and for the servlet mapping. Also the file "faces-config.xml" has been created.

Right click on the JSF project and click on Properties. Go to Java Build path -> Libraries and expand the JSF and JSTL library. You can see all the jars associated to the library and the "Publish/ export dependency" shows where the jars has to be placed, when you deploy to the server.

Next step is to add tomcat 6 to eclipse.


Post a Comment