Hi Nishan,
I am not sure how that would work.
the form is on many pages but goes to the same action class.
<s:form action="user!login" >
.....<s:textfield name="user.username" size="10" label="username"/>
.....<s:password name="user.password" size="10" label="password"/>
.....<s:submit value="login"/>
</s:form>
Here is my action mapping
<action name="user" class="com.forum.web.UserAction" method="input" >
...<result name="success" >index.jsp</result>
</action>
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..
<action name="user" class="com.forum.web.UserAction" method="input" >
...<result name="success" >%{fromPage }</result>
</action>
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.