Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3629

StartupServletContextListener crashes if FacesServlet is defined in web-fragments.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.9
    • Fix Version/s: 2.2.13, 2.3.2
    • Component/s: JSR-314
    • Labels:
      None

      Description

      I'm trying to move all my common web.xml content from my 12 webapps in an EAR into a web-fragment.xml which gets referenced.

      MyFaces fails with the following Exception if the FacesServlet is defined in a web-fragment rather than web.xml:

      >If you did that and find nothing, the mistake might be due to the fact that you use some special
      >web-containers which do not support registering context-listeners via TLD files and a context listener is not
      > setup in your web.xml.
      > A typical config looks like this;
      > <listener>
      > <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
      > </listener>

      In general the StartupServletContextListener defined in JSF-2.1 is pure PITA as it does crash apps which do not have any JSF content at all!.

      We should scan if we either find a faces-config.xml or any *.xhtml files in the app and if not we shall not start JSF.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wtlucy Bill Lucy
                Reporter:
                struberg Mark Struberg
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: