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

Make JSP 2.1 optional

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.0
    • 1.2.2
    • JSR-252
    • None

    Description

      Myfaces 1.2.0 requires JSP 2.1 to be present. Otherwise the StartupServletContextListener fails with this error:

      Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
      java.lang.NoSuchMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
      at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:102)
      at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:57)

      JSP version 2.1 or better JSP in general should be an optional dependency, like discussed here and implemented in Sun RI too:
      http://www.nabble.com/Does-MyFaces-1.2-require-JSP-2.1--tf4112432.html#a11693501

      Use cases:

      • Run Myfaces 1.2.0 in JEE 1.4 environment (Tomcat 5.x).
      • Easier setup and smaller distributions when running Myfaces in an embedded servlet container (jetty) with facelets. For example I'm using jetty for junit tests. I haven't found a working setup which solves the jsp problems.

      Attachments

        1. facelets-jsf12-debug.zip
          3 kB
          Bernhard Huemer
        2. MYFACES-1693.patch
          43 kB
          Bernhard Huemer

        Activity

          People

            Unassigned Unassigned
            ahuegen Achim Huegen
            Votes:
            5 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: