I have a
jsp form looking like --
<s:form action="saveData">
.....
<s:submit value="save" action="saveData" name="submit"></s:submit>
<s:reset value="reset" name="reset"></s:reset>
<s:submit value="display" action="displayData" name="display"></s:submit>
</s:form>
I find that when I click the first button (save) the URL shows the /saveData.action.
But when I click the second button, I still see URL as /saveData.action, but the interesting thing is when I click the second button it is actually doing the right thing, which is displaying the data. I thought it is because I put the buttons inside the form and in the <form> attribute I already defined action="saveData". So I tried removing action="saveDat" in the <form> tag. After I did that, two buttons still did what are supposed to do. But when I clicked the first button it still saved Data but the URL shows the /displayData.
How can I insure that clicking the two buttons can both do the right logics and see the correct (desired) URL ?