title: how to Use <c:forEach> in scripts tag on JSP page?
body: <p>Hey How to use  loop in  tag in jsp page?</p>
  
  <p>i want to use JSTL data to pass in data tables</p>
  
  <p>my code is like :</p>
  
  <p></p>
  
  <pre><code>        $(document).ready(function() {
  
  
              /* Init DataTables */
              var startString = "[";
              var mainString = "";
              var endString = "]";
  
  
              var temp = ${k.size()};
          &lt;c:forEach items="${k}" var="stdn" varStatus="status"&gt;
              temp--;
              if (temp === 0) {
                  mainString = mainString + "{key:\"" + "${stdn.key}" + "\",name:\"" + "${stdn.value.name}" + "\",rollno:\"" + "${stdn.value.rollNo}" + "\",marks:\"" + "${stdn.value.marks}" + "\"}";
              } else {
                  mainString = mainString + "{key:\"" + "${stdn.key}" + "\",name:\"" + "${stdn.value.name}" + "\",rollno:\"" + "${stdn.value.rollNo}" + "\",marks:\"" + "${stdn.value.marks}" + "\"},";
              }
          &lt;/c:forEach&gt;
                  var finalString = startString + mainString + endString;
                  var final = eval(finalString);
  </code></pre>