...
- Download the Tomahawk examples distribution and extract the simple.war
- Extract the contents of the simple.war into a new directory:
$JETTY-HOME/webapps/simple - Make a new directory:
$JETTY-HOME/lib/ext/myfaces - Move all of the jars in
$JETTY-HOME/webapps/simple/WEB-INF/libinto$JETTY-HOME/lib/ext/myfaces. You can delete thexml-apis-1.0.b2.jaras there is already an api jar in the Jetty lib hierarchy. - MyFaces uses commons-logging for log messages. As Jetty does not use commons-logging, you need to select a log impl. We recommend that you use SLF4J's commons-logging bridging mechanism, as Jetty is able to work with SLF4J logs. If you elect to do that, you need to download the
jcl104-over-slf4j-1.0.1.jarand an SLF4J impl, such as theslf4j-simple-1.0.1.jarand put them somewhere in$JETTY-HOME/lib, such as your$JETTY-HOME/lib/ext/myfacesdirectory. Or, you might like to put those jars into$JETTY-HOME/lib/ext(one level higher) as you might want to share them with other webapps.Edit$JETTY-HOME/webapps/simple/WEB-INF/web.xmland add these lines:Code Block xml <listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener> - Run Jetty as usual:
java -jar start.jar - Surf to
http://localhost:8080/simple - Refer to the MyFaces docs for more info