title: Multiple Javascript tag inclusions in jsp
body: <p>Here is my code in a jsp:  </p>
  
  <pre><code>&lt;script&gt;  
  var myArray = [];
  &lt;/script&gt;
      &lt;c:forEach var="attributes" items="FROMthisBEAN"  varStatus="vStatus" &gt;  
                  &lt;script&gt;
                   //Executes for each iteration. Do something COOL.
                   myArray.push("Something from this iteration");
                  &lt;/script&gt;
      &lt;/c:forEach&gt;
  </code></pre>
  
  <p>Now please consider the following: </p>
  
  <pre><code>&lt;script&gt;  
      var myArray = [];    
          &lt;c:forEach var="attributes" items="FROMthisBEAN"  varStatus="vStatus" &gt;  
                      myArray.push("Something from this iteration");
          &lt;/c:forEach&gt;
   &lt;/script&gt;
  &lt;c:forEach var="attributes" items="FROMthisBEAN"  varStatus="vStatus" &gt;  
                  //Executes for each iteration. Do something COOL.
  &lt;/c:forEach&gt;
  </code></pre>
  
  <p>Both the codes give me the same output.<br>
  The question is which one is better when it comes to performance?<br>
  In the first case the script tag inside c:forEach repeats again and again.<br>
  But in the second case I'm creating one more c:forEach which is already present in the JSP.<br>
  Totally lost here. Please advise.</p>