As a beginner in spring web applications, I am facing an issue where the request mapping receives a "dual" parameter when I submit a form. The form structure is as follows:
<form action="" method="post" name="myform">
......
</form>
To submit the form and navigate to different pages, I utilize a JavaScript function like below:
function gotoPage(pageNumber)
{
document.forms['myform'].action="trx?page=" + pageNumber;
document.forms['myform'].submit();
}
When I include a link on my JSP page like this,
<a href="javascript:gotoPage('3')">Page number: 3</a>
The controller for the request mapping /trx should receive the parameter page with the value of "3". However, it is returning "3,3".
I am puzzled by this inconsistency. Interestingly, if I use parameters like action=search or action=sort, everything functions correctly.