You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Vladimir Limansky (JIRA)" <ji...@apache.org> on 2008/03/04 21:25:07 UTC

[jira] Created: (WW-2533) NullPointerException using dojo tags even though tag included within tiles.

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

                 Key: WW-2533
                 URL: https://issues.apache.org/struts/browse/WW-2533
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - Tiles
    Affects Versions: 2.1.0
         Environment: struts2-tiles-plugin-2.1.0.jar struts2-core-2.1.0.jar
            Reporter: Vladimir Limansky


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



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2533) NullPointerException using dojo tags even though tag included within tiles.

Posted by "Vladimir Limansky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43471#action_43471 ] 

Vladimir Limansky commented on WW-2533:
---------------------------------------

Jeromy, I also have the problem with usage of sx:datetimepicker tag if <sx:head /> and <sx:datetimepicker ..../> tags are located on different tiles (<sx:head /> on the head tile and <sx:datetimepicker ..../> on the body tile). The picker tag is not being displayed at all! Could you please give me a piece of advise how to handle this?

> NullPointerException using dojo tags even though <sx:head /> tag included within tiles.
> ---------------------------------------------------------------------------------------
>
>                 Key: WW-2533
>                 URL: https://issues.apache.org/struts/browse/WW-2533
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tiles
>    Affects Versions: 2.1.0
>         Environment: struts2-tiles-plugin-2.1.0.jar struts2-core-2.1.0.jar
>            Reporter: Vladimir Limansky
>             Fix For: 2.1.1
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (WW-2533) NullPointerException using dojo tags even though tag included within tiles.

Posted by "Jeromy Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeromy Evans closed WW-2533.
----------------------------

       Resolution: Duplicate
    Fix Version/s: 2.1.1

Caused by the Head.PARSE_CONTENT flag not being available in the PageContext.
Fixed in 2.1.1 WW-2398

Work-around it in 2.1.0 by setting sx:head parseContent="true" or "false" within the PageContext that the Tile/JSP is used. 

If that is not appropriate, set "struts.dojo.head.parseContent" to true/false in the page context using the <s:set> tag.

> NullPointerException using dojo tags even though <sx:head /> tag included within tiles.
> ---------------------------------------------------------------------------------------
>
>                 Key: WW-2533
>                 URL: https://issues.apache.org/struts/browse/WW-2533
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tiles
>    Affects Versions: 2.1.0
>         Environment: struts2-tiles-plugin-2.1.0.jar struts2-core-2.1.0.jar
>            Reporter: Vladimir Limansky
>             Fix For: 2.1.1
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.