First of all, it getarrayVals()should be written getarrayVals(), and it should obviously return List, not a string.
Now suppose the servlet or action sets the “b” attribute of type B as follows:
request.setAttribute("b", theBInstance);
and then go to JSP, you can access the list in attribute "b" as follows:
${b.arrayVals}
B , . foo, ${foo.arrayVals}.
toString . 3 ,
${b.arrayVals[3]}
, c: forEach:
<c:forEach items="${b.arrayVals}" var="element">
The element value is ${element} <br/>
</c:forEach>