title: Calling Java class from JSP button onclick
body: <p>I am trying to to call a Java class when a button gets clicked from JSP. inside my JSP file I have the following:</p>
  
  <pre><code>&lt;%
    Object name = session.getAttribute("name");
    Object ext = session.getAttribute("ext");
    DBOps ops = new DBOps();
    ReturnGetDisplayInfo GDI = ops.getDisplayInfo(ext); 
  %&gt;
  </code></pre>
  
  <p>I have a method in DBOps that will delete a certain field so I added a button to teh table that displays the information and now I am trying to call the delete method when the button is clicked. so I tried doing the following but it did not work.</p>
  
  <pre><code>&lt;td&gt;&lt;button onclick=&lt;% ops.delete(ext); %&gt;&gt;Delete&lt;/button&gt;&lt;/td&gt;
  </code></pre>
  
  <p>I was looking at some examples that utilize javascript but it uses defiend functions in teh script rather than calling the Java class. </p>
  
  <p>Thanks in advance</p>