I went through all of the posts related to JSTL and arrayList , still couldn't find the solution.
I have been trying to iterate an ArrayList over a jsp file using taglib. I have included latest jstl 1.2 jar in my build path. Have configured the taglib properly.
But still get an error infront of the line which uses
<c:forEach>
tag. It says
<c:foreach>not recognized!,
yes it is showing error with a 'e' in forEach !
Please find my code below.
Controller code :
List<String> rolesList = new ArrayList<String>();
rolesList.add(ga.getAuthority());
JSP Code :
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<select>
<c:forEach items="${rolesList}" var="role">
<option>${role}</option>
</c:forEach>
</select>