Here is a simple example that shows how to populate Javascript array values from JSTL iteration tags:

<script type=’text/javascript’>
    var arr = new Array();
    <c:forEach begin="1" end="5" var="current">
        arr.push(<c:out value="${current}" />);
    </c:forEach>   
</script>

The Javascript arr array now contains values from 1 to 5.

JSTL Books on Amazon.com