I have an existing URL with get parameters. On a button click, I want to change one specific URL parameter, but retain the others. Is that possible?
Thymeleaf template:
<a th:href="@{/order/details(id=3)}">
Results in:
<a href="/order/details?id=3">
What if I want to
- preserve other parameters in the URL
- override the
idparameter?
Desired result of the thymeleaf template above:
localhost:8080/order/details?name=test&id=3
Preferably without javascript.