title: How can I call servlet from jsp without using form
body: <p>This could be a repeat question, I apologize. I have a jsp page in which I have some buttons. Each button has its own servlet to call. I want to know if there is any way I can call these servlets without using form because the user may choose any of the 3 functionalities given. I also need to pass a value from the jsp page to the servlets I call.</p>
  
  <pre><code>&lt;html&gt;  
  &lt;head&gt;  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;  
  &lt;title&gt;Configurations&lt;/title&gt;  
  &lt;script type="text/javascript"&gt;  
      function runConfiguration(){  
          var config=${dataValues.get(0)};  
          //call servlet  
      }  
      function editConfiguration(){  
          var config=${dataValues.get(0)};  
          //call servlet  
      }  
      function deleteConfiguration(){  
          var config=${dataValues.get(0)};  
          //call servlet  
      }  
  &lt;/script&gt;  
  &lt;/head&gt;  
  &lt;body&gt;  
  &lt;%  
  String[] label={"Master Port","Baud Rate","Char Size","Stop Bits","Parity","RTU Port","Baud Rate","Char Size","Stop Bits", "Parity"};  
  int i=0;  
  %&gt;  
  &lt;br&gt;  
  &lt;br&gt;  
  &lt;br&gt;  
  &lt;table align="center" border="1"&gt;  
     &lt;td&gt;&lt;div align="center" style="background-color: goldenrod;"&gt;&lt;b&gt; ${dataValues.get(0)}&lt;/b&gt;&lt;/div&gt;   
          &lt;table width="210" align="left" border="1"&gt;  
              &lt;td bgcolor="goldenrod"&gt;&lt;b&gt; Header1 &lt;/b&gt;&lt;/td&gt;  
              &lt;c:forEach var="data" begin="1" end="5" items="${dataValues}" varStatus="status"&gt;  
              &lt;tr&gt;  
                  &lt;td&gt;&lt;%=label[i++]%&gt;: ${data}&lt;/td&gt;  
              &lt;/tr&gt;  
              &lt;/c:forEach&gt;  
          &lt;/table&gt;      
          &lt;table width="210" align="left" border="1"&gt;  
              &lt;td bgcolor="goldenrod"&gt;&lt;b&gt; Header2 &lt;/b&gt;&lt;/td&gt;  
              &lt;c:forEach var="data" begin="6" end="10" items="${dataValues}" varStatus="status"&gt;  
              &lt;tr&gt;  
                  &lt;td&gt;&lt;%=label[i++]%&gt;: ${data}&lt;/td&gt;  
              &lt;/tr&gt;  
          &lt;/c:forEach&gt;  
          &lt;/table&gt;  
     &lt;/td&gt;  
  &lt;/table&gt;  
          &lt;c:choose&gt;  
          &lt;c:when test="${dataValues.get(11)==1}"&gt;  
                  &lt;p align="center"&gt;&lt;b&gt;&lt;i&gt;This configuration is already running&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  
                  &lt;p align="center"&gt;  
              &lt;input type="button" value="stop" onclick="StopConfiguration"/&gt;  
                  &lt;/p&gt;  
          &lt;/c:when&gt;  
          &lt;c:otherwise&gt;  
                  &lt;p align="center"&gt;&lt;b&gt;&lt;i&gt;This configuration is currently NOT running&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  
                  &lt;p align="center"&gt;                     
                      &lt;button type="button" onclick="runConfiguration()"&gt;Run&lt;/button&gt;  
                      &lt;button type="button" onclick="editConfiguration()"&gt;Edit&lt;/button&gt;  
                      &lt;button type="button" onclick="deleteConfiguration()"&gt;Delete&lt;/button&gt;  
                  &lt;/p&gt;  
          &lt;/c:otherwise&gt;  
      &lt;/c:choose&gt;  
  &lt;/body&gt;  
  &lt;/html&gt;  
  </code></pre>