You give each button a name and a value, and they are passed as query parameters just like other form fields. Note that one common trick is to have multiple SUBMIT buttons - all with the same name, but different values - and use them to control what the
servlet does with the form data.
eg.
The HTML contains:
and the servlet contains: