Originally posted by Satou kurinosuke: Yes you can. You'll have to tell the servlet which action you wish to execute though. You could use a request parameter like "action=add", or "action=substract", depending on which button you press.
action attribute in form element specifies the servelet name.The question is to have a single servler.
You can do this by many ways, one I have given below:
Jaikiran, thank you. Yes, that is what I was meaning. The name of "action" was confusing. I was not talking about the form's action, but about the a request parameter called action : MyServlet?action=add or MyServlet?action=substract