I have 4 JSP pages in my application. Saying Next leads me to the next JSP Page and Cancel always takes me to the first JSP page with default values loaded.Saying Previous takes me to the previous page with the selected values restored. All this is to implemented using Struts ,having a Single Action Class and a Single Form Bean. My Page 1 contains 2 Combo Boxes My Page 2 contains 2 Listboxes. The user selects some items of List 1 and moves into List 2. Saying Next should save the List 2 and take me to Page 3. Page 3 again has exactly the same scenario as Page 2 .Saying Next takes me to Page 4. Page 4 again contain 2 Combo Boxes. I should go on appending the field values of Pages I navigate in the Request so that its available in my Formbean. So in my Action class I get the request parameter values of Page 1 and set it again in the Request .In Page 2, I have a hidden variable corr. to fields of Page 1 and I assign the values by doing request.getAttribute. How should I do the same thing for storing my Listbox values of Page 2 in the request and then how do I retrieve the same in Page 3 ?
In the above cases its always better to store the values in session mean make the scope of the form bean session and at any time clean that once if u want.............see the best example in all the commercial websites where u do online purchase will be 4-5 step process but at the end they will give the summary in one page (all the parameters in the 4-5 step process) i all these cases the data will be persisted in session
that too placing 4-5 lists wont affect ur performance too
Joined: Oct 30, 2002
Thanks for the Reply. but my problem is that I CANNOT put it in Session(not my decision ) The main thing I am stuck is I don't know how to pass the list from Page 2 so that it is avaialble in subsequent request. I want it the way I am retrieving the value of combo in Action class by saying request.getParameter() and then again setting it in the Request so that it is avaialable in the next page. Any ideas how this could be done ? Also, would like to know if there is Listbox tag in Struts ?
Priya, correct me if I'm wrong but isn't your question just a basic servlet question? How do you get the values selected by the user in ListBox? I mean if you knew, you would just pass those values to the next page using request.setAttribute, right? [ September 01, 2004: Message edited by: Rovas Kram ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com