I am new to JSTL. How can i use JSTL <c:foreach> inside jsp if i pass below sample bean
class B{
private String value="";
private ArrayList arrayVals;
public String getvalue(){
return value;
}
public String getarrayVals(){
return arrayVals;
}
}
I will pass Bean "B" only. I tried like below, but jsp not compiled. Please help me.
<c:forEach items="${B.getarrayVals}" var="book">
<c:out value="{book.title}"/>
</c:forEach>