<form method="post" action="servletName">
<input type="submit" id="btn1" name="btn1"/>
<input type="submit" id="btn2" name="btn2"/>
</form>
on pressing it request will go to servlet on the servlet page check which button is pressed and then accordingly call the needed method as objectName.method