This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have an ArrayList, which consists two beans. I want to iterate through it and print the values. Can you please explain me as how I would do it using <logic:iterate> and <bean:write>
Thanks, Dinakar.K
Dom Lassy
Ranch Hand
Joined: May 05, 2006
Posts: 181
posted
0
This assumes your form is called myForm and it has a method called "getArrayList()". It also assumes that the objects in the array list have a "getValue()" method.
I'm not clear on what you mean by "I have an ArrayList, which consists two beans".
Ram Kas
Ranch Hand
Joined: Jul 26, 2006
Posts: 81
posted
0
I am not using a form. I have got some fields from database(resultset) which I inserted into a bean. This bean is again added to an ArrayList. I,then, placed the ArrayList in request scope. Now, I am trying to loop through the ArrayList in jsp page.
Any idea towards helping me solve this is highly appreciated.
Thanks Dinakar.K
Dom Lassy
Ranch Hand
Joined: May 05, 2006
Posts: 181
posted
0
Where "myArrayList" is the name you put the array list into request scope under, and where your array list contains objects that have a "getValue()" method.