This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have page A.jsp, it goes to Action1, this action forwards to Action2 and finally ends up in B.jsp. My problem is that in B.jsp the browser has the url of Action1, so if I reload the page (B.jsp) Action1 and Action2 are executed. I would like to change the url so that it points to Action2. Does anyone knows how to do this??
This causes Struts to send an instruction back to the browser to redirect to Action2, thereby having the URL line in the browser read "Action2.do".
However, this has a side-effect that may be unwanted: the request context is lost between Action1 and Action2. That means that any objects you attached to the request will be gone. If you need to pass information from Action1 to Action2, you will have to do it with parameters passed in the URI.