I've been working with this to avoid strange behaviour when using the browser's back button. It seems Spring's AbstractWizardFormController stores the current page in the session so all methods with the "int page" parameter look there unless you send the PARAM_PAGE parameter.
PARAM_PAGE = "_page" by default.
Using PARAM_PAGE parameter when submitting one particular step of the wizard avoids incorrect page numbering by specifying the number of the page that made request for a page change. I use it like this in the JSP:
First page:
Code:
<FORM method="POST" action="?_target1&_page=0">
Second page:
Code:
<FORM method="POST" action="?_target2=true&_page=1">
and so on...
This way I'm specifying two things:
1.- What page I want (_targetX)
2.- What page I am (_page=X)
Now the "page" parameters in AbstractWizardFormController's methods take the value of what you specified inthe JSP.