Sunday 15 January 2012

html - Calling Java class from JSP button onclick -


I am trying to call a Java class when a button is pressed with a JSP. I have the following in my JSP file:

    

I have a method in DBPS that will remove a certain field so that I added a button to display the table which displays the notification and now I click on the button to delete I am trying to call the method. So I tried to do the following but it does not work.

  & lt; Td> & Lt; Button onclick = & lt;% ops.delete (ext); % & Gt; & Gt; Remove & lt; / Button & gt; & Lt; / TD & gt;   

I was looking at some examples which uses JavaScript but instead of calling the Java class, it uses the defined function in the test script.

Thank you in advance

You can not do this directly to a roundtrip on the server

The best option is to:

  • Make a servlet that requests the removal of the handle request when a fixed url has arrived
  • Usage (or Original

    (This is also an option, which is applicable using AJX)

No comments:

Post a Comment