File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes single actionform bean spans multiple jsp pages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "single actionform bean spans multiple jsp pages" Watch "single actionform bean spans multiple jsp pages" New topic

single actionform bean spans multiple jsp pages

Poorav Chaudhari
Ranch Hand

Joined: Sep 17, 2002
Posts: 50
I have a single actionform bean that is spanning multiple jsp pages, I also want to give the user the capability of jumping between the jsp pages in whichever order they wish. but the data once entered should persist till they hit the save button. what is happening in my case is that i am passing a populated bean to the first page of the four jsp pages i have. the first page is populated, but when i go to the next page, the second page does not have any values. If i was directing to the second page first then the second page comes up fine but going to first page from the second page i am losing all my data. I hope that explains my situation clearly enough. can someone give me suggestions of what is should do. I thought about keeping hidden fields, but that doesn't seem the best solution especially since each form page i have is rather large.

Thanks in advance.


Poorav Chaudhari
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Try storing the bean in Session context.

An IDE is no substitute for an Intelligent Developer.
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
You can do this in the struts-config.xml or in the Action servlet.
I agree. Here's the link:
subject: single actionform bean spans multiple jsp pages
It's not a secret anymore!