[ 
https://issues.apache.org/jira/browse/WW-5526?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lukasz Lenart updated WW-5526:
------------------------------
    Description: 
{{<s:include/>}} or {{<jsp:include/>}} tag before an closing tag will "destroy" 
the page context which leads to an NPE

{noformat}
java.lang.NullPointerException: Cannot invoke 
"javax.servlet.ServletRequest.getAttribute(String)" because "this.request" is 
null
 at 
org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java:341)
 ~[jasper.jar:9.0.96]
 at org.apache.struts2.dispatcher.AttributeMap.get(AttributeMap.java:102) 
~[struts2-core-6.7.1.jar:6.7.1]{color}
 at org.apache.struts2.components.UIBean.getTheme(UIBean.java:646) 
~[struts2-core-6.7.1.jar:6.7.1]{color}
 at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:663) 
~[struts2-core-6.7.1.jar:6.7.1]
 at org.apache.struts2.components.UIBean.end(UIBean.java:558) 
~[struts2-core-6.7.1.jar:6.7.1]
 at 
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:38)
 ~[struts2-core-6.7.1.jar:6.7.1]
{noformat}

  was:
s:include or jsp:include tag before an closing tag will "destroy" the page 
context which leads to an NPE

 

+{color:#1b6acb}java.lang.NullPointerException{color}+{color:#000000}: Cannot 
invoke "javax.servlet.ServletRequest.getAttribute(String)" because 
"this.request" is null{color}

{color:#000000} at 
org.apache.jasper.runtime.PageContextImpl.findAttribute({color}+{color:#1b6acb}PageContextImpl.java:341{color}+{color:#000000})
 ~[jasper.jar:9.0.96]{color}

{color:#000000} at 
org.apache.struts2.dispatcher.AttributeMap.get({color}+{color:#1b6acb}AttributeMap.java:102{color}+{color:#000000})
 ~[struts2-core-6.7.1.jar:6.7.1]{color}

{color:#000000} at 
org.apache.struts2.components.UIBean.getTheme({color}+{color:#1b6acb}UIBean.java:646{color}+{color:#000000})
 ~[struts2-core-6.7.1.jar:6.7.1]{color}

{color:#000000} at 
org.apache.struts2.components.UIBean.evaluateParams({color}+{color:#1b6acb}UIBean.java:663{color}+{color:#000000})
 ~[struts2-core-6.7.1.jar:6.7.1]{color}

{color:#000000} at 
org.apache.struts2.components.UIBean.end({color}+{color:#1b6acb}UIBean.java:558{color}+{color:#000000})
 ~[struts2-core-6.7.1.jar:6.7.1]{color}

{color:#000000} at 
org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag({color}+{color:#1b6acb}ComponentTagSupport.java:38{color}+{color:#000000})
 ~[struts2-core-6.7.1.jar:6.7.1]{color}


> attribute lookup against PageContext leads to NPE
> -------------------------------------------------
>
>                 Key: WW-5526
>                 URL: https://issues.apache.org/jira/browse/WW-5526
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Tags
>    Affects Versions: 6.7.1, 7.0.1
>            Reporter: michael.hinten...@silbergrau.com
>            Priority: Major
>             Fix For: 7.0.2, 6.7.2
>
>
> {{<s:include/>}} or {{<jsp:include/>}} tag before an closing tag will 
> "destroy" the page context which leads to an NPE
> {noformat}
> java.lang.NullPointerException: Cannot invoke 
> "javax.servlet.ServletRequest.getAttribute(String)" because "this.request" is 
> null
>  at 
> org.apache.jasper.runtime.PageContextImpl.findAttribute(PageContextImpl.java:341)
>  ~[jasper.jar:9.0.96]
>  at org.apache.struts2.dispatcher.AttributeMap.get(AttributeMap.java:102) 
> ~[struts2-core-6.7.1.jar:6.7.1]{color}
>  at org.apache.struts2.components.UIBean.getTheme(UIBean.java:646) 
> ~[struts2-core-6.7.1.jar:6.7.1]{color}
>  at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:663) 
> ~[struts2-core-6.7.1.jar:6.7.1]
>  at org.apache.struts2.components.UIBean.end(UIBean.java:558) 
> ~[struts2-core-6.7.1.jar:6.7.1]
>  at 
> org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:38)
>  ~[struts2-core-6.7.1.jar:6.7.1]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to