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

Henri Yandell closed STR-2996.
------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.7
         Assignee: Henri Yandell  (was: Don Brown)

svn ci -m "Applying the patch from STR-2996. I'm not a Tiles expert, but this 
seems like a simple one to me. "

Sending        
tiles/src/main/java/org/apache/struts/tiles/taglib/ImportAttributeTag.java
Transmitting file data .
Committed revision 504721.

> ImportAttributeTag throws a NullPointerException when ignore=true and the 
> attribute value is not available
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: STR-2996
>                 URL: https://issues.apache.org/struts/browse/STR-2996
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Tiles
>    Affects Versions: 1.3.5
>         Environment: All
>            Reporter: Josh Landin
>         Assigned To: Henri Yandell
>             Fix For: 1.3.7
>
>         Attachments: STR-2996-fix.patch
>
>
> This bug is from regression caused by the fix for STR-2809.
> Given the JSP with:
> <tiles:importAttribute name="doesntExist" ignore="true"/>
> The following exception occurs:
> java.lang.NullPointerException
>       at java.util.Hashtable.put(Hashtable.java:393)
>       at 
> org.apache.jasper.runtime.PageContextImpl.setAttribute(PageContextImpl.java:238)
>       at 
> org.apache.struts.tiles.taglib.ImportAttributeTag.doStartTag(ImportAttributeTag.java:167)
> This is due to the ImportAttributeTag class incorrectly calling 
> pageContext.setAttribute with a null value. This call was previously 
> unreachable prior to the fix for STR-2809 which eliminated the SKIP_BODY 
> returns when ignore=true.
> The behavior of the PageContext implementation is consistent with the Servlet 
> 2.2 Specification:
> http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/jsp/PageContext.html#setAttribute(java.lang.String,%20java.lang.Object,%20int)

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

Reply via email to