Description

With the advent of FACES-1655 (Enable zero-config of BridgeSessionListener), we were able to remove the Mojarra ConfigureListener and Liferay Faces BridgeSessionListener from WEB-IN/web.xml in the demo portlets(FACES-1666).

This worked in all servers except Jetty 8. It turns out that Jetty 8 has two issues that prevent it from working:

1. The "annotations" feature of Jetty is not enabled by default which enables classpath scanning for .tld descriptors and classes annotated with the Servlet 3.0 @ServletContainerInitializer annotation.

In order to enable the feature, the following red text needs to be added to the $JETTY_HOME/bin/start.ini file:

2. Jetty uses the GlassFish implementation of JSP. The source code for the org.apache.jasper.runtime.TldScanner class revealed that it will register any TLD except those that have "http://java.sun.com/jsf/core" or "http://java.sun.com/jsf/html" inside them (which includes the Mojarra jsf-impl.jar dependency).

In order to overcome this problem, it is necessary to develop a new liferay-faces-jetty.jar dependency that contains a ServletContainerInitializer that auto-registers the Mojarra ConfigureListener (or MyFaces StartupServletContextListener).