<form method="POST" action="..."> . . . <input type="submit" name="ok" value="ok" src="ok.gif" /> <input type="submit" name="cancel" value="cancel" src="cancel.gif" /> </form>
Now, when the form submits, you can check to see if
"ok".equals(request.getParameter("ok")). I think you can also give the buttons the same name, and just check the value to see which one was clicked.
ok.yvariables, since a submit for an image button doesn't return a value for
ok, but the X and Y coordinates that you clicked when submitting.