title: Calling a method in server side in the change event of a checkbox JSP
body: <p>I am using jquery for doing this example.
  I have my checkbox declare</p>
  
  <pre><code>&lt;input type="checkbox" checked="checked" id="checkbox1" /&gt;
  
  &lt;script&gt;
    $('#checkbox1').change(function() {
    if (!$(this).is(':checked')) {
           &lt;% call the jave method %&gt;
    }
  else
  {
    &lt;%call the java method%&gt;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>The problem consist that when the page is loading the two actions are evaluated. I was thinking in using ajax but haven't found one example for check box change events.</p>