This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Restoring the last page visited Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Restoring the last page visited" Watch "Restoring the last page visited" New topic
Author

Restoring the last page visited

az ziz
Ranch Hand

Joined: Dec 17, 2008
Posts: 50
----------------------------
dear all,

in my application we have an iframe where the independent transaction are loaded, each transaction having multiple pages to navigate and complete the transaction. after the successful login i frame is loaded with a default page, after which the user open various transaction selecting from the menu. as the pages are loaded in the iframe and in between the transaction if the user refreshes the page the iframe opens to the default page. what should happen is load the page the user left before refreshing.
to attain this functionality i stored the last visited request uri in the session (done in the "customactionservelet") , if the page was refreshed i forwarded it to this uri. but what happens is it directly navigates to the saved uri.

start -->
transaction page "A" opened from menu
-->
submits the form
-->
do some calculation in the "A" action and maps to "B"
-->
transaction navigates to the page "B"
-->
user refreshes the page (whole page)
-->
now the application loads the "B" page directly


the question is how do i make the page do the process of submit from "A" to "B" and the fwd to page "B"



----------------------------
 
 
subject: Restoring the last page visited