Hi like the title says I am trying to read an array from my java Servlet. I am trying to read the array in my java script file.
Java servlet code: String graphData[]
You can use like this
<script> var graphData = [ <c:forEach items="${graphData}" var="graph"> '<c:out value="${graph}" />', </c:forEach> ]; console.log(graphData); </script>