Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0-beta-1
    • Fix Version/s: 3.0-beta-2
    • Component/s: specs
    • Security Level: public (Regular issues)
    • Labels:
      None

      Description

      When you create an application which contains a JSF mapping in your web.xml file, JSP (JavaServer Pages) files which contain an EL function, throw a NPE. Here is the web.xml changes I added to a small JSP application:

      <servlet>
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>/faces/*</url-pattern>
      <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>

      After doing this and deploying the application, the following page throws an NPE:

      hello.jsp:

      Test: '$

      {pageContext.getRequest()}

      '

      Exception:

      java.lang.NullPointerException
      javax.el.CompositeELResolver.invoke(CompositeELResolver.java:225)
      javax.el.CompositeELResolver.invoke(CompositeELResolver.java:225)
      org.apache.el.parser.AstValue.getValue(AstValue.java:159)
      org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:189)
      org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:985)
      org.apache.jsp.hello_jsp._jspService(hello_jsp.java:63)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:668)

        Activity

        Hide
        Jarek Gawor added a comment -

        The problem is that the CompositeELResolver was iterating over the resolvers array directly instead of relying on the size field.
        Fix committed in revision 1327712.

        Show
        Jarek Gawor added a comment - The problem is that the CompositeELResolver was iterating over the resolvers array directly instead of relying on the size field. Fix committed in revision 1327712.

          People

          • Assignee:
            Jarek Gawor
            Reporter:
            Jarek Gawor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development