I call "addObject" ModelAndView as follows: modelAndView.addObject("userNames", userNames); The second argument is an ArrayList of strings. How can I iterate over this list on a JSP page?
This is what I have, but it does not work:
<select id="users"> <c:forEach var="userName" items="${userNames}"> <option>${userName}<option/> </c:forEach> </select>
Do I need to add tag imports to use elements in the c tag?
source share