Bug 8668 - Passing a null value to <c:set> where the target is a JavaBean fails to set the property to null.
Summary: Passing a null value to <c:set> where the target is a JavaBean fails to set t...
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: All All
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-30 16:14 UTC by Ryan Lubke
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Lubke 2002-04-30 16:14:26 UTC
Given:

    <c:set target="simple" value="${null}" property="value"/>
    
    -or-

    <c_rt:set target='<%= (SimpleBean) pageContext.getAttribute("simple") %>'
              property="value" value='<%= null %>'/>

    <c:out value="${simple.value}" default="Bean property null."/>

The default in this case isn't invoked.
Comment 1 Shawn Bayern 2002-05-01 03:56:53 UTC
Fixed.  Technically, the spec shouldn't say "Setting a bean property with 
<c:set> is therefore exactly the same as setting an attribute value of an 
action using the EL"; it should specifically exclude "null" from that case.  
But I don't think we really need to worry about that, since the spec's intent 
is clear and the RI was just wrong.  I've fixed the problem.