File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Restoring the last page visited" Watch "Restoring the last page visited" New topic

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"

I agree. Here's the link:
subject: Restoring the last page visited
It's not a secret anymore!