I have an HTML form, which is passed to a Java server page. I am using

String WhoClicked = request.getParameter ("ButtonNameHere");

but i noticed that when i click a button, its value attribute goes into the
string. for instance, with the button:

<input type="submit" name="NextRecords" value="Next">

my request puts the value "Next" into my String WhoClicked. So i thought
i could name two buttons the same name with different values, like this:

<input type="submit" name="NextorPrevious" value="Next">
<input type="submit" name="NextorPrevious" value="Previous">

Then I could just check my string to see if it was "Next" or "Previous",
so that i could know which button was clicked, but it's not working. Please
help, I'm stuck!