Meaningless Drivel is fun!*
The moose likes Struts and the fly likes unexpected Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "unexpected "chaining" of events across pages" Watch "unexpected "chaining" of events across pages" New topic

unexpected "chaining" of events across pages

Ben Hagadorn

Joined: Mar 28, 2006
Posts: 25
I wonder if anyone else has run across this and, if so, how do I avoid it�..

I have two JSP pages (A and B). Both have a CANCEL button and both have code in their ACTION like this:

if (this.isCancelled(request)) {
return mapping.findForward("returnToPreviousPage");

There are links on page A that take the user to page B. What I am seeing is that when the user selects the CANCEL button on page B they are taken back to page A (correct so far). But then in the ACTION for page A where I check this.isCancelled(request) I end up in the THEN clause and go back to the page that opened A. I don�t want this � I want to go back from B to A and stop there.

Can anyone help me?

- Ben
I agree. Here's the link:
subject: unexpected "chaining" of events across pages
Similar Threads
How to track browser back button action in JSP pages
Cancel button must go back to the previous jsp page
My First Struts App
Warning: Page has Expired
Forwarding a request from a jsp to servlet or an html page