MyFaces Core
  1. MyFaces Core
  2. MYFACES-1964

JspException thrown if actionListener's type attribute is not supplied

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.4
    • Fix Version/s: 1.2.5
    • Component/s: JSR-252
    • Labels:
      None
    • Environment:
      tomcat-6.0.16
      java 1.6
      MyFaces 1.2.5-SNAPSHOT

      Description

      In MyFaces 1.2.5-SNAPSHOT, the type attribute of actionListener has been set to a non-required attribute. But if you have something like this in your page:

      <h:commandButton value="This button with binding attribute">
      <f:actionListener binding="#

      {coreTc1Bean.actionListener}

      "/>
      </h:commandButton>

      It will throw a javax.servlet.jsp.JspException - type attribute not set. This also happens in MyFaces 1.2.4. I've attached the test case above.

      This problem does not exist in JSF RI 1.2 though.

      1. myfaces-1964.patch
        1 kB
        Paul Rivera
      2. test-case.rar
        2 kB
        Paul Rivera

        Issue Links

          Activity

          Hide
          Paul Rivera added a comment -

          Here's the stack trace:

          javax.servlet.jsp.JspException: type attribute not set
          at org.apache.myfaces.taglib.core.GenericListenerTag.doStartTag(GenericListenerTag.java:83)
          at org.apache.jsp.core.core_002dtc_002d1_jsp._jspx_meth_f_005factionListener_005f1(core_002dtc_002d1_jsp.java:296)
          at org.apache.jsp.core.core_002dtc_002d1_jsp._jspx_meth_h_005fcommandButton_005f1(core_002dtc_002d1_jsp.java:265)
          at org.apache.jsp.core.core_002dtc_002d1_jsp._jspx_meth_h_005fform_005f0(core_002dtc_002d1_jsp.java:159)
          at org.apache.jsp.core.core_002dtc_002d1_jsp._jspx_meth_f_005fview_005f0(core_002dtc_002d1_jsp.java:113)
          at org.apache.jsp.core.core_002dtc_002d1_jsp._jspService(core_002dtc_002d1_jsp.java:75)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
          at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:341)
          at org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486)
          at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)
          at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
          at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
          at java.lang.Thread.run(Unknown Source)
          09 12, 08 9:48:40 AM javax.faces.webapp._ErrorPageWriter handleThrowable
          SEVERE: An exception occurred
          javax.faces.FacesException: An exception occurred processing JSP page /core/core-tc-1.jsp at line 14

          11: </h:commandButton>
          12:
          13: <h:commandButton value="This button with binding attribute">
          14: <f:actionListener binding="#

          {coreTc1Bean.actionListener}

          "/>
          15: </h:commandButton>
          16:
          17: </h:form>

          Show
          Paul Rivera added a comment - Here's the stack trace: javax.servlet.jsp.JspException: type attribute not set at org.apache.myfaces.taglib.core.GenericListenerTag.doStartTag(GenericListenerTag.java:83) at org.apache.jsp.core.core_002dtc_002d1_jsp._jspx_meth_f_005factionListener_005f1(core_002dtc_002d1_jsp.java:296) at org.apache.jsp.core.core_002dtc_002d1_jsp._jspx_meth_h_005fcommandButton_005f1(core_002dtc_002d1_jsp.java:265) at org.apache.jsp.core.core_002dtc_002d1_jsp._jspx_meth_h_005fform_005f0(core_002dtc_002d1_jsp.java:159) at org.apache.jsp.core.core_002dtc_002d1_jsp._jspx_meth_f_005fview_005f0(core_002dtc_002d1_jsp.java:113) at org.apache.jsp.core.core_002dtc_002d1_jsp._jspService(core_002dtc_002d1_jsp.java:75) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:341) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486) at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source) 09 12, 08 9:48:40 AM javax.faces.webapp._ErrorPageWriter handleThrowable SEVERE: An exception occurred javax.faces.FacesException: An exception occurred processing JSP page /core/core-tc-1.jsp at line 14 11: </h:commandButton> 12: 13: <h:commandButton value="This button with binding attribute"> 14: <f:actionListener binding="# {coreTc1Bean.actionListener} "/> 15: </h:commandButton> 16: 17: </h:form>
          Hide
          Leonardo Uribe added a comment -

          This issue is the same as MYFACES-1964, and the solution is very, very simple. Just remove the code that throws the exception (there are two places on the same program). One of this should be closed as duplicate and the other fixed.

          Show
          Leonardo Uribe added a comment - This issue is the same as MYFACES-1964 , and the solution is very, very simple. Just remove the code that throws the exception (there are two places on the same program). One of this should be closed as duplicate and the other fixed.
          Hide
          Paul Rivera added a comment -

          Attached myfaces-1964.patch

          Show
          Paul Rivera added a comment - Attached myfaces-1964.patch
          Hide
          Leonardo Uribe added a comment -

          thanks to Paul Rivera for provide us this patch

          Show
          Leonardo Uribe added a comment - thanks to Paul Rivera for provide us this patch

            People

            • Assignee:
              Leonardo Uribe
              Reporter:
              Paul Rivera
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development