Iterating over an array of objects in jstl
HI,
I am new to JSTL. Other day, I came across the <c:forEach/> tag.Now if I have to iterate over an arraylist which contains objects created by the programmer, how do I do that?Suppose the arraylist conatains the objects of the follwing class:-
class Demo {
private String name;
public void setName(String name)
{
.....
}
public String getName(){......}
}
Now suppose I want to display all the names in my JSP page which are contained in the arraylist.Could any one show me a sample code?
Thanks in advance