Hello,

I'm using Struts-1.0-b2.

I'm trying to iterate over an array of objects using the iterate tag
as follows:

<logic:iterate id         = "header"
               collection = "<%= headers %>"
               type       = "some.class">

But I get an error like:

Attribute type invalid according to the specified TLD

And indeed it looks like the "type" attribute is not specified
in the TLD, contrary to what the documentation says.
When I try to drop the "type" attribute I see in the .java class
that Tomcat defines "header" as a "java.lang.Object" and obviously
fails later when I access class methods. I also tried to declare
"header" using "useBean", but I get a "variable already defined"
error.

Does anyone know what am I doing wrong?

Also, I read in the documentation that now the iteration tag
exposes the current index number, can anyone show me how can
I access this from a JSP page?  I couldn't find an example in
the distribution.

Thanks,

--Amos Shapira

Reply via email to