In my servlet I have the following. All four are ArrayList<>, each with 5 values.
request.setAttribute("interestEarnList", interestEarnList);
request.setAttribute("numYear", numYear);
request.setAttribute("endBalanceList", endBalanceList);
request.setAttribute("startBalanceList", startBalanceList);
I want to display them on jsp file in the form of:
Year Number: ${numYear},
Beginning Balance of this year is: ${startBalanceList},
Ending Balance of this year is: ${endBalanceList},
Total interest earned this year: ${interestEarnList},
And loop this based on the size of numYear arrayList.
I have tried forEach but unfortnately it will display all numYear values, then all startBalanceList values, and so on.