Im working with Spring Boot and Thymeleaf. I want to redirect user after submitting succesfully a submit form (page B) to the page from which the user came from (page A). The easiest case is case page A -> page B -> page A. I found several post already:
Author states that 3 solutions exist:
- Add a hidden form attribute which contains the current page.
- Use the referer request header to determine where the request came from.
- Submit the form through ajax so that you stay on the current page.
Are there more modern approaches for this problem in thymeleaf + spring? I came across Spring Webflow but that seems overkill for my problem and outdated.
Thanks in advance!