private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery
Integrating with the JSF Reference Implementation
The Java Server Faces reference implementation at https://javaserverfaces.dev.java.net can be used with Jetty. Usually, it expects to be deployed into a full JavaEE container such as glassfish, however with very little effort you can use it with Jetty too.
Steps
These steps have been tested with the 1.2_01-b04 version of JSF, however the steps will remain essentially the same for any version.
- Download the jsf jar. DO NOT download from the javaserverfaces site site, as those jars contain a bundling of a number of classes which would be duplicates when deployed into Jetty. INSTEAD download from the same repository that glassfish uses: http://download.java.net/javaee5/external/shared/jsf/jars/jsf-1.2_01-b04.jar
- Download these dependency jars:
- http://download.java.net/javaee5/external/shared/com-sun-commons-collections/jars/com-sun-commons-collections-2.1.jar
- http://download.java.net/javaee5/external/shared/com-sun-commons-beanutils/jars/com-sun-commons-beanutils-1.6.1.jar
- http://download.java.net/javaee5/external/shared/com-sun-commons-digester/jars/com-sun-commons-digester-1.5.jar
- Make a new directory:
$JETTY_HOME/lib/ext/jsf - The jars that we downloaded in the first 2 steps are actually archives containing the real jars that we need. Unjar all of them into
$JETTY_HOME/lib/ext/jsf. You should eventually have:- com-sun-commons-beanutils.jar
- com-sun-commons-collections.jar
- com-sun-commons-digester.jar
- jsf-api.jar
- jsf-impl.jar
Thats it! All you need to do now is to start jetty in the normal way.
You might like to learn more about JSF, or examine the JSF FAQ.
A good starting point is to download a JSF release. Unpack it, and look in the samples/ directory. You should find these example war files that you can copy to $JETTY_HOME/webapps to play with:
*jsf-cardemo.war
*jsf-components.war
*jsf-guessNumber.war
*jsf-renderkits.war
*webtier-sample.war