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 you can use it with Jetty too.

Steps

Pick the instructions according to the release of the JSF RI you have.

JSF RI 1.2_01-b04:

  1. 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
  2. Download these dependency jars:
  3. Make a new directory: $JETTY_HOME/lib/ext/jsf
  4. 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:

JSF RI 1.2_03:

  1. Download the binary release from the JavaServerFaces site.
  2. Unpack the release
  3. Make a new directory: $JETTY_HOME/lib/ext/jsf
  4. Copy jsf-api.jar and jsf-impl.jar from the jsf release into $JETTY_HOME/lib/ext/jsf

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.

Look in the samples/ directory of your JSF release. You should find these example war files that you can copy to $JETTY_HOME/webapps to play with: