PUBLIC - Liferay Faces
  1. PUBLIC - Liferay Faces
  2. FACES-1668

Enable zero-config of Mojarra and MyFaces servlet context startup listeners on Jetty

    Details

    • Similar Issues:
      Show 5 results 

      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:

      OPTIONS=Server,jsp,resources,plus,annotations
      ../etc/jetty.xml
      ../etc/jetty-deploy.xml
      ../etc/jetty-webapps.xml
      ../etc/jetty-contexts.xml
      ../etc/jetty-annotations.xml

      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).

        Activity

        Hide
        Neil Griffin added a comment -
        Show
        Neil Griffin added a comment - See Also: Deploying JSF Portlets on Jetty

          People

          • Assignee:
            Neil Griffin
            Reporter:
            Neil Griffin
            Participants of an Issue:
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development

                Subcomponents

                  Structure Helper Panel