while using struts can we make a jsp with multiple html forms???

Discussions

Web tier: servlets, JSP, Web frameworks: while using struts can we make a jsp with multiple html forms???

  1. HI !
    i am using tomcat and struts for our web application the problem i am facing is i have one very large form (loan application form ) which consists of many information sequences and i cannot break it to different pages (yes i have breaked it into multiple pages which i include in a single page at runtime but it is just for minimizing html code in one page so that debugging could be easy )......
    the problem is that i could not allow user to enter information in one portion of a form and submit it then move to another portion i need to move entire information in one single form (having some master detail sections as well) to the server end then do other things to that submitted information (validation,saving into adtabse e.t.c)...i could do that using one page and one large form been ......but have following things in mind
    1) How could i manage the master details sections of this form that is struts populates entire bean with parameters from entire page but how struts will populate detail records which have one to many ratio.....

    can it be a solution to devide that one large form into small html forms and then define all those form beans and actions for each form ... but is it precticle....and is there any example given for such problem .....
    don't mind friends but i only need to get benifit from your knowledge before i waste the same time as some of you have already wated while solving the same problem :)....
    thanks in advance..
  2. Hi,

    As your users move through the process of filling out your form do you need to act on the form data at each step?

    It is easy to have a form that spans multiple jsp's with struts. Make sure that your form bean is part of the session and not the request object. Also be sure to include some type of form validation routine that checks to make sure all of the required information has been submitted before you send the whole form off to the server for processing.

    Regardin master-detail relationships with forms. You can use something like indexed properties in struts for this. Basically your master form bean will have as a property another java class representing the detail row...you can look at this Struts and indexed properties

    Ciao.
  3. Forms rendering frameworks[ Go to top ]

    Hello!

    Writing code for your JSP forms is quite a job especially when you have to handle forms that are split up into several pages.

    I opted for a forms management framework like Formular (http://formular.redeye.no) that handles all the navigational issues between pages, and carries the data for me until the very end.

    There should be other products out there you could look at for your particular needs, but this package works perfect for my and the little team here. Splitting large forms into pages, no problem any more.