You need the following:
1. Download Tomcat server v6. Unzip it to directory of your choice.
Add Tomcat server to Eclipse IDE: go to Preferences -> Server -> Runtime Environments and click ‘Add...’. Follow the wizard, which asks for path to Tomcat directory.
2. Download JSF implementation libraries and unzip to directory of your choice.
To import JSF and JSTL libraries to Eclipse, go to Settings and navigate to: Web -> JavaServer Faces Tools -> Libraries and click ‘New...’.
Set name for your JSF library (eg. JSF API) and add jsf-api.jar and jsf-impl.jar to JSF library. Select ‘Is JSF Implementation’ checkbox.
Click ‘New’ button again and set the name for JSTL library. Add jstl.jar and standard.jar libraries. Do not select ‘Is JSF Implementation’ checkbox.
For proper deployment and undeployment of JSF project war file, you should add all four libraries (jsf-api.jar, jsf-impl.jar, jstl.jar, standard.jar) to your project, into directory ‘WebContents/lib’ so the libraries will be automatically deployed together with war file.
Many things have changed in past few years. New specifications and standards have been written... Let's clear things up. The following table shows dependencies which are required to properly set up project environment.
|Servlet spec||JSP spec||EL spec||WebSocket spec||JSF spec||Apache Tomcat version||JBOSS version||Glassfish version||Java version|
|3.0||2.2||2.2||1.0||2.1 and 2.2||7.0.x||6.x and 7.x||3.x||6 (WebSockets 1.0 require Java 7)|
|2.5||2.1||2.1||N/A||1.2 and 2.0||6.0.x||5.x||2.x||5|
|2.4||2.0||N/A||N/A||1.0 and 1.1||5.5.x||4.x||Sun Java AS||1.4|