• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple JSP pages with Single Action class & form beans

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Folks,

I need to implement a wizard-like functionality. Basically, it will contain 3 steps in separate JSP pages & the third page is where we need to submit the data that is entered in all three pages.
In each of these pages, there is 'previous' & 'next' button, which means I need to retain values in each of these pages if the user would like to 'go back' after a certain validation error in the current page.

I am planning to have a single form bean & single action class to implement the above functionality.

Listed below are my initial thoughts on how to go about implementing this. Experts in this forum, please help me if I have gone wrong in my thoughts...
1. I need to have three different action mapping entries (in struts-config.xml file) each for buttons in each of the pages?
2. I can use the same form & same action class for ALL the action mapping entries & keep the scope in 'session'?
3. In each of the three JSPs, I can have a <html:form> tag which maps to the same form?
4. How would be the validation in each specific form be possible?

If anyone has come across such scripts, appreciate if you can provide me the reference. Also, if you think this is a bit more tedious than creating 3 form beans / 3 action classes, please advise.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic