Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 Pick the instructions according to the release of the JSF RI you have.

JSF RI 1.2_01-b04 version of JSF, however the steps will remain essentially the same for any version.:

  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:
    • com-sun-commons-beanutils.jar
    • com-sun-commons-collections.jar
    • com-sun-commons-digester.jar
    • jsf-api.jar
    • jsf-impl.jar

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.

A good starting point is to download a JSF release. Unpack it, and look 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:

...

Contact the core Jetty developers at www.webtide.com
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