title: running javascript function inside jsp
body: <p>Is it possible to run javascript functions inside jsp tags? 
  I'd like to run a sudden function as many times as there's objects in my ArrayList. Below doesen't work, but I hope it gives an idea of what I'm trying to achieve.</p>
  
  <pre><code>    &lt;script&gt;
      function test(){
          alert();
      }
      &lt;/scripts&gt;
  
  
  &lt;% 
  ArrayList&lt;Marker&gt; list = new ArrayList&lt;Marker&gt;();
  
  list = (ArrayList&lt;Marker&gt;)request.getAttribute("markers"); 
  
  for(int i = 0; i &lt; list.size(); i++){
      %&gt;
          &lt;script&gt;
          &lt;%
          test();
          %&gt;
          &lt;/script&gt;
      &lt;%
  }
  %&gt;
  </code></pre>
  
  <p>Is it possible to do it with something like ?</p>
  
  <pre><code>&lt;c:forEach var="name" items="${markers}"&gt;
     &lt;%-- call my javascript function --%&gt;
  
  &lt;/c:forEach&gt;
  </code></pre>