And as you can see it always goes back to index.jsp but really I want it to go back to the page where the form was displayed ( the same page where the person was on before they used the login form ) and there are many JSPs where this form is displayed
Now I know that you can use a dynamic forward, so if I create a variable fromPage in my UserAction I can then make my action mapping..
But it is populating that variable with the Action that I use to to create the jsp which shows the login form. I can easily pass in the JSP path in a hidden variable but all JSPs are created after an Action class call.
subject: Struts2: Dynamically returning to last page shown after an action call from a form submit.