title: how to execute method of action class without refreshing the page in struts2
body: <p>i am developing an application using struts2. i have a button in a JSP page, which executes an action method upon its click. i want to execute this action method but without refreshing the page. is there any way i can accomplish that? what the action does is that is sets a value of an integer and i just have to display it on the page.</p>
  
  <p>my method:</p>
  
  <pre><code>public void setVariable(){
      //Code to get a random integer
      return "SUCCESS";
  }
  </code></pre>
  
  <p>jsp page code for form:</p>
  
  <pre><code>&lt;form method="post" action="setVariable"&gt;
      &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;
  </code></pre>