Thx! Lot of info here, will have a look... :)
BTJ
On 29.03.2016 08:35, Jan Bartel wrote:
I can't see anything particularly wrong with the dependencies, except you need to remove com.sun.el:el-ri:1.0.
I'm attaching a very small example project, which is the standard jsf guessNumber webapp, configured to run with the jetty maven plugin. The only trick to getting this to work is to ensure that:
1. the jsf jars are on the container classpath and not the webapp classpath (in this case this is achieved by adding the jsf jars to the plugin dependencies)
2. the jsf jars are scanned by jetty (this is achieved by the configuration element <containerIncludeJarPattern>.*/jsf-[^/]*\.jar$</containerIncludeJarPattern>
Point 2 above is actually a jetty maven plugin specific way of telling jetty that there are some jars that need scanning for tlds etc.
If you're not using the maven plugin, then the way to do it is to set up a context attribute called
"org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern" to some regexps that match the names of the jars that need scanning. In the jetty distro, the pattern in the etc/jetty-deploy.xml file is: .*/[^/]*servlet-api-[^/]*\.jar$|.*/javax.servlet.jsp.jstl-.*\.jar$|.*/org.apache.taglibs.taglibs-standard-impl-.*\.jar$
So to add in the pattern for jsf, the full final pattern would be:
.*/jsf-[^/]*\.jar$| .*/[^/]*servlet-api-[^/]*\.jar$|.*/javax.servlet.jsp.jstl-.*\.jar$|.*/org.apache.taglibs.taglibs-standard-impl-.*\.jar$
Note that if you need to set this pattern in code instead, you'd need to escape the backslashes like so:
webappContext.setAttribute( "org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern", " .*/jsf-[^/]*\\.jar$|.*/[^/]*servlet-api-[^/]*\\.jar$|.*/javax.servlet.jsp.jstl-.*\\.jar$|.*/org.apache.taglibs.taglibs-standard-impl-.*\\.jar$");
Try playing around with the guessNumber example to make it more like your setup. My guess is that the jsf jars just aren't being initialized correctly, most probably because they're not being scanned, hence the need for the org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern attribute .
You can also turn on debug logging for annotations (org.eclipse.jetty.annotations.LEVEL=DEBUG if using standard jetty logging) and verify that you see the jsf jars being included for scanning. You should see lines like:
Scanning jar [path to]/jsf-impl-2.2.13.jar
Jan
|