• 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

How to "carry" JSP form input over few pages (clicks) down ?

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Suppose my scenario is --- JSP1 --(calls)--> ActionServlet -(calls Action1)-then-(forward to)--> JSP2 - calls ActionServlet --(calls Action2)--then-forward-to --> JSP3 -->....

When "Action2" is called it can get "JSP2"'s input by access JSP2's FormBean. But I want "Action2" utilizes "JSP1"'s FormBean as well, however, for some reason I set the scope to "request" which means FormBean1 for JSP1 can't be available by default. SO, how to "carry" JSP1's FormBean ? Using hidden variable ? How to use hidden variable in struts ? Haven't seen any example yet so not sure if it is a good idea.
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you need to set the action scope to 'session'; otherwise the form-bean instance is destroyed after each request.

you may consider finding an online guide or a book that shows you how to do 'multipage' form. the most difficult part in multipage form is the validation, which i think you'll run into.
 
rubbery bacon. rubbery tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic