creating an array in jsp from list of objects
<p>I am trying to build an array of DemoNames.name attribute, dynamically in jsp, how can i create an array and then pass to my js file for further validation?</p>

<pre><code>&lt;c:forEach items="${demoNames}" var="DemoNames"&gt;
  ${DemoNames.name}
&lt;/c:forEach&gt;
</code></pre>