Bug 6568 - Attribute not deleted, even if attribute is not valid
Summary: Attribute not deleted, even if attribute is not valid
Status: CLOSED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: JNDI Taglib (show other bugs)
Version: unspecified
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-20 06:26 UTC by Jochen Luell
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Luell 2002-02-20 06:26:02 UTC
When using getAttribute on a Search, Attributes that don't exist for the current
entry are not removed from the context but are kept.
This results in getting old entries.

A resolution could be to remove the attribute from context if not present.

Line 210 to 212 which looks like this

if (theAttribute == null) {
            return SKIP_BODY;
        }else ...

could be changed to:

if (theAttribute == null) {
                    if (getId() != null) {
                        pageContext.removeAttribute(getId(), scope);
                    }
            return SKIP_BODY;
        } else ...

which should resolve the problem.
Comment 1 Glenn Nielsen 2002-04-06 21:46:49 UTC
Thanks for reporting this.  The bug fix you suggested has been implemented.