title: Set array values in javascript from JSTL code
body: <p>I have a code that looks like this:<br>
  <br>
  In AnalyzeUserClient.jsp:</p>
  
  <pre><code>&lt;c:set var="arrayList"&gt;&lt;%= (ArrayList&lt;String&gt;)request.getSession().getAttribute("arrayList") %&gt;&lt;/c:set&gt;
  var sessionId = [];
  &lt;c:forEach items=${arrayList} var="id"&gt;
  sessionId.push("${id}"); // add them one at a time, assuming string values
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>However,this line:</p>
  
  <pre><code>    sessionId.push("${id}");
  </code></pre>
  
  <p>does not seem to be passing the values into the array "sessionId" (I viewed the source code on browser).So the question is,what can I do to pass the values into the array?
  <br>
  <br>
  EDIT:I just realised that there are some problems as JSTL is server-side and JavaScript is client-side.So is there a workaround on it?</p>