I am trying to iterate over a
string array declared in a
JSP using the logic:iterate tag,
(sample snippet)
<%!
String[] temp = {"a","b"};
%>
<html>
<logic:iterate id = "element" collection = "<%=temp%>">
<%=element%>
</logic:iterate>
</html>
struts docs say that when using the collection attribute to iterate over a something like an array of primitives or objects, the value of the attribute should be a RT exprn/. that evaluates to the actual object that needs to be iterated over.
I assumed this is how it should be done. No luck. fails to iterate.
would appreciate any insights.
Thanks in advance