Bug 8668

Summary: Passing a null value to <c:set> where the target is a JavaBean fails to set the property to null.
Product: Taglibs Reporter: Ryan Lubke <Ryan.Lubke>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   

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.