Bug 34137 - getAttribute using iterate reuses bodycontent on 2nd call.
Summary: getAttribute using iterate reuses bodycontent on 2nd call.
Status: RESOLVED LATER
Alias: None
Product: Taglibs
Classification: Unclassified
Component: JNDI Taglib (show other bugs)
Version: 1.2.0
Hardware: PC Windows NT
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-22 21:07 UTC by Andy Wagner
Modified: 2009-11-29 19:35 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Wagner 2005-03-22 21:07:18 UTC
On Windows 2000, Tomcat 5.0.27 and after successfully obtaining an LDAP result 
a 2nd call to getAttribute will produce the same text returned in the first 
call, if the first call attribute 'cn' contains data and the second call 
attribute 'secretary' is a missing attributr from the result.
<BR>
  <jndi:getAttribute ref='result' attribute='cn' id='cnval' 
multivalue='iterate'>
      <%=cnval%><BR>
  </jndi:getAttribute>
<BR>
  <jndi:getAttribute ref='result' attribute='secretary' id='asecval' 
multivalue='iterate'>
      <A HREF=MVC?PAGE=DISPLAY&dn=<%=asecval%>>Admin Link</A><BR>
  </jndi:getAttribute>

fix by adding clearBody to doEndTag;

                bodyContent.writeOut(pageContext.getOut());
added to fix->  bodyContent.clearBody();
Comment 1 Henri Yandell 2009-11-29 19:35:19 UTC
Resolving as the JNDI taglib has been retired.