Struts 2: redirect-action ? From on page to another and back again.

Posted by Stephan on Stack Overflow See other posts from Stack Overflow or by Stephan
Published on 2010-06-01T14:33:37Z Indexed on 2010/06/01 17:23 UTC
Read the original article Hit count: 148

Filed under:
|

Hello, i have a jsp page that has a submit button. This button is linked with another jsp page.

So lets assume my stuts file looks like this:

B.jsp

So now the submit button being on page "A.jsp" will take me to B.jsp. This works. The problem is that i want to do the following:

press on the submit button on page A.jsp , go to B.jsp where i will press again a button and go back to A.jsp . The problem is that to page B.jsp go many pages, so B.jsp has to know when pressing the submit button to which page will take me back , in this case A.jsp again.

So in a few words, B.jsp has to know from which page i came from so that i can go back again by pressing a submit button (this could be a parameter that would be sent back to A.jsp again, but does not really matter at the current point)

A.jsp -> B.jsp -> A.jsp C.jsp -> B.jsp -> C.jsp

© Stack Overflow or respective owner

Related posts about redirect

Related posts about struts2