title: Avoid infinite loop using onload event
body: <p>I'm pretty new at javascript and I've encountered a problem:
  I 've a method which calls an Action through a button in my jsp page.</p>
  
  <p>The thing is, I want to execute this Action immediately after loading my jsp page, without having to use the button event.</p>
  
  <p>I'm trying to use the onload() event inside the body of the JSP. This does executes my Action after loading, however, it stays in an infinite loop, because it loads the page over and over again.</p>
  
  <pre><code>&lt;script language="JavaScript" type="text/javascript"&gt;
      function send()
      {
          document.forms['thisForm'].submit(); 
      }
  &lt;/script    
  ....
  &lt;body onload="send()"&gt;
  
  &lt;html:form action="/something/foo.do?method=methodFoo" method="post"&gt;
  </code></pre>
  
  <p>Is there anyway to avoid this infinite loop?
  Thanks a lot!</p>