Here is my code snippet which adds an arraylist to model attribute
List<ViewBillResult> viewResult = viewBillBusiness.searchViewBill(stBillId);
model.addAttribute("viewResult", viewResult);
I have accessed each BillSearchResult attribute's on jsp page as follows
<c:forEach var="viewLis" varStatus = "number" items="${viewResult}" >
<tr >
<td><form:hidden path="viewList[${number.index}].billNo"/></td>
</tr>
</c:forEach>
How can i access the first index of searchResult array without using forEach(I want to access viewResult.get(0).billNo )