I develop a web application in java jee, and I would like to know how to use the button continue and go back in the post method in a form? thank you in advance
Asked
Active
Viewed 267 times
0
-
you can use a form and then put your action where you want go like continue or go – Binod Pant Jul 12 '17 at 14:59
-
I would use both actions to go back and forth in my form without using the backspace of the browser. Already I can continue specifying in form action. How to go back? – John Jul 12 '17 at 15:10
-
Yes suppose I return this way. If I want a button to continue in the same form I do how keeping this code back? – John Jul 12 '17 at 15:19
-
try below answer – Binod Pant Jul 12 '17 at 15:21
-
It seems you need [`memento`](https://en.wikipedia.org/wiki/Memento_pattern) pattern. If you need it in java. – Sergii Jul 12 '17 at 16:12
1 Answers
0
suppose your back page name is back.jsp
then use
<form action="${pageContext.request.contextPath}/back.jsp" method="post">
<input type="submit" value="back"/>
</form>
suppose your forward page name is forward.jsp
then use
<form action="${pageContext.request.contextPath}/forward.jsp" method="post">
<input type="submit" value="next"/>
</form>

Binod Pant
- 332
- 1
- 2
- 16
-
It is not possible to manage these multiactions in the same form with different buttons? – John Jul 13 '17 at 09:58
-
-
Excuse me for tiring you! How to associate two actions back and continue in the same form. These actions are to move to the URL of the next page or the url of the previous page with the different buttons associated. – John Jul 13 '17 at 10:05