If I submit this form:
<form id="confirmForm" method="POST">
<input type="hidden" name="guid" value="guidval"/>
</form>
to this url:
/AltRT?guid=guidval
mapped to this controller method:
@RequestMapping(method = RequestMethod.POST)
public String indexPost(@RequestParam String guid)
I am getting both values for my guid. So the value of guid
is guidval,guidval
. I would like to only get the value from the form.
Is there any way tell Spring to ignore query string parameters?
EDIT for more clarification: The query string is left over from another (get) request. So, if I could clear the query string that would work as well. Also, I do not want edit the name
of the form input because I want this post endpoint to be available to other services without having to change them as well.