Caroline,

Wait a second...

Collection threadRows = ( Collection
)request.getAttribute( "ThreadBeans" );

int odd = 0;
Iterator iterator = threadRows.iterator();
while( iterator.hasNext() ) {
odd = ( odd + 1 )%2;
ThreadBean threadBean = ( ThreadBean
)iterator.next();

      .....
   }
%>

5. when I tried to write out the properties; for
example:

<%=threadBean.getSender()%>
<%=threadBean.getThreadReplyCount()%>
<%=threadBean.getThreadViewCount()%>

This message doesn't look like it's coming from this body of code. Are you mixing scriptlets (as above) with 'bean' tags?

If so, you're mixing apples and oranges, since the bean tag doesn't do anything with "local" variables created by scriptlet code.

Are you sure you don't have something like this anywhere:

<bean:write name="threadBean" property="name" />

If so, you'll have to put your object into some scope (page or request, maybe) before using it with the bean tags. That's a bit sloppy, though, and I'll recommend again that you stick to using the taglibs exclusively rather than scriptlets.

-chris

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to