aspose file tools*
The moose likes Struts and the fly likes navigation problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "navigation problem" Watch "navigation problem" New topic
Author

navigation problem

krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
i have series of pages connected by 'back' and 'next' buttons. i have problems in navigating through pages.

on clicking the 'next' or 'back' button of a jsp, it's Action is called, and in the action, depending upon the button pressed, i set the forward.

Forward mapping
"success" - jsp of that action.
"back" - previous page's Action class.
"next" - next page's Action class.

simple code logic
if(no button of that action is pressed)
set forward as "succcess"
else if('next' is pressed)
set forward as "next"
else if('back' is pressed)
set forward as "back"

What should happen

1. clicked next button on a jsp page
2. it's action is called
3. forward is set as "next".
4. The Action for the next page is called
5. it's forward is set as "success"
6. jsp of next page is called

what actually happens

1. clicked next button on a jsp page.
2. it's action, Action1 is called.
3. forward is set as "next".
4. The action for the next page, Action2 is called.
5. forward is set as "success".
6. Action1 is called.
7. forward is set as "success"
8. the same page is displayed, instead of next page.

"success" is mapped to a jsp page in struts-config.xml. But even after setting the forward to "success", how in the world an Action file (*.do) is called. I have debugged the code in jboss eclipse, and i tracked the series of events. Even RequestProcessor's 'name' is set as "success" and 'path' has been set to a jsp file, but how the Action file being called is...i couldn't figure out.


have a great day,
krishna prasad
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: navigation problem