--------------------------------------------------------------------------------
I have this test working where it takes data from a Java class and shows it in a JSP:
String targetItems = "test"
List pageItems = New ArrayList;
for(int i = 0;i < calculatedResults + 10;i++)
{
pageItems.add(targetItems + " " + i)
}
request.setAttribute(pageItems, "pageItems");
I would like to stop using test and put real data in using
an ArrayList but my attempt outputs a huge array of info for each record:
ArrayList<TargetBean> targetItems = New ArrayList<TargetBean> (TargetListing.getList());
List pageItems = New ArrayList;
for(int i = 0;i < calculatedResults + 10;i++)
{
pageItems.add(targetItems + " " + i)
}
request.setAttribute(pageItems, "pageItems");
Please advise.