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.
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:
- Make a new directory:
- 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:
Thats it! All you need to do now is to start jetty in the normal way.
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: