-1

I would like to do the following thing in JSP:

List<String>list = new ArrayList<String>();
for( Arulista aru: Arulista){
list.add(aru.aruneve);
}

I did the following but it's not working:

<c:forEach items="${Arulista}" var="aru">
$list=${aru.aruneve}   // $List.add(aru.aruneve) But either not working 
</c:forEach>
Michael Benjamin
  • 346,931
  • 104
  • 581
  • 701
Davinho
  • 107
  • 1
  • 9

1 Answers1

2

Jsp's are for display not building lists. You should transform the list in your controller and then display it in the jsp.

javaMoca
  • 175
  • 7