Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2533

NullPointerException using dojo tags even though <sx:head /> tag included within tiles.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.1
    • Component/s: Plugin - Tiles
    • Labels:
      None
    • Environment:

      struts2-tiles-plugin-2.1.0.jar struts2-core-2.1.0.jar

      Description

      Got NPE trying to add dojo tags on the page (sx:submit, sx:datetimepicker .... ) see the stack trace attached below.

      My tiles definition looks as follows:

      <definition name="default" template="/layout/default.jsp">
      <put-attribute name="head" value="/common/AjaxHead.action"/>
      <put-attribute name="leftMenu" value="leftLayout"/>
      <put-attribute name="rightMenu" value="rightLayout"/>
      <put-attribute name="body"/>
      <put-attribute name="footer" value="/common/Footer.action"/>
      </definition>

      <sx:head /> tag is in the "head" tile. dojo tags are in the "body" tile.

      But everything works fine if <sx:head /> tag shares the same tile ("body") with dojo tags (on the same JSP page).

      See similar complains here: http://www.mail-archive.com/user@struts.apache.org/msg69511.html

      The stack trace:
      org.apache.jasper.JasperException: java.lang.NullPointerException
      at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:535)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:429)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      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)
      .......
      Caused by: java.lang.NullPointerException
      at org.apache.struts2.dojo.components.Submit.evaluateExtraParams(Submit.java:239)
      at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:828)
      at org.apache.struts2.dojo.components.Submit.evaluateParams(Submit.java:175)
      at org.apache.struts2.dojo.components.Submit.end(Submit.java:272)
      at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:41)
      at org.apache.jsp.EditEvent_jsp._jspx_meth_sx_005fsubmit_005f0(EditEvent_jsp.java:651)
      at org.apache.jsp.EditEvent_jsp._jspx_meth_s_005fform_005f0(EditEvent_jsp.java:223)
      at org.apache.jsp.EditEvent_jsp._jspService(EditEvent_jsp.java:119)
      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:387)
      ... 239 more

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                vlimansky Vladimir Limansky
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: