Installing JSF 1.1 in TOMCAT 5.5.23
In this section, we will learn about installation of
JSF 1.1 to TOMCAT 5.5.23. Java Server Faces (JSF) requires some steps to follow
while configuring it in TOMCAT. Here we are considering you comfortable
installing the tomcat. There is nothing much to do to install JSF if you have
already installed and configured tomcat 5.5.23. We require
- Tomcat 5.5.23
- Jsf 1.1
- Servlet 2.3
- Jsp 1.2
The steps required to make your JSF application run are
summarized below :
- Download zip file of tomcat 5.5.23 from http://tomcat.apache.org/download-55.cgi#5.5.23.
- Extract this file to the directory of your choice
(suppose c:/tomcat) (remember
to set JAVA_HOME variable).
You will get 9 sub-folders into this tomcat directory :
and some files.
- Download zipped file of jsf 1.1 Reference
Implementation from http://java.sun.com/javaee/javaserverfaces/download.html.
- Extract the above zipped file of jsf 1.1 to the
directory of your choice (suppose c:/jsf).
You will get 7 sub-folders in this jsf folder :
and some files.
- Copy all jar files from jsf/lib directory of above
extracted file to tomcat/common/lib directory.
- Copy two jar files "jstl.jar"
from tomcat/webapps/jsp-examples/WEB-INF/lib directory to tomcat/common/lib
- Set class path for these jar files.
- Start tomcat.
After configuring JSF in tomcat, we can create and run
JSF application. After making any changes in application, its better restart the
tomcat before running the application. If you want to run a sample application
provided by JSF reference implementation then
- go to jsf/samples folder
- copy any war file from here to tomcat/webapps
- restart tomcat server
This war file gets extracted automatically to the
directory structure with the same name of war file. Now you can run this
application in tomcat and you can follow the directory structure of these
applications to make your own application. In this tutorial, all steps have been
described in simple manner by a simple application "SimpleHelloByEnteringName".