The ${productData.someCount} is not valid Java, it is a JSP thing. There are a number of ways to do this.
1- <% // Retrieve Product data reference,assuming it is of type ProductData
// and assuming it has been stored in the pageContext
ProductData productData = (ProductData)(ageContext.get("productData");
for (int i=0; i < productData.someCount; i++) {
// Write my text here
} %>
2- JSTL - If you are using JSTL then it is alot more elegant <c:forEach var='i' begin='0' end='${productData.someCount}'> // Write my text here </c:forEach>
Andy Engle wrote:
Hi all,
I am trying to do something as simple as writing a FOR loop with some information that I have in a bean, but this is proving to be quite a bit more cumbersome and difficult than I thought it would be. For some reason, everything I try seems to fail. Here is a short example of what I'm trying to do:
<% for(int i = 0; i < ${productData.someCount}; i++) { %> // Write my text here <% } %>
What am I missing here? If you could help me I'd appreciate it -- enough time wasted on this thing already.
Thanks, Andy
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]