Bug 34137

Summary: getAttribute using iterate reuses bodycontent on 2nd call.
Product: Taglibs Reporter: Andy Wagner <andy.wagner>
Component: JNDI TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED LATER    
Severity: normal    
Priority: P2    
Version: 1.2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   

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.