But the form is not populated. Now if I put the form in session scope
and in the jsp call <html:text name="data" property="data1">
this works but I dont want to add my forms to session scope because I have many and also I think this also gives me the following problem when I hit my "next" link the form that i get in the action is empty.
The execute method of your Action has an ActionForm parameter for a reason. It is not necessary to instantiate forms. Define your form for the ActionMapping in your struts-config. Using this method, and if you use the html:form tag, the name attribute of your html: tags is no longer necessary. This will prevent a lot of confusing errors like the one you're having.
A good workman is known by his tools.
Joined: Oct 27, 2003
Thanks Marc. I still have a doubt on this, The ActionForm in the Action is from the previous page(right?), and if I'am trying to set values for a form on the next jsp, would I not have to do the above to populate. (if not could you point me in the right direction with a general outline of what you have said above in terms of dummy code)
also i find that the next action gets an empty actionform because i'am using <a href="ViewData4.do?dispatch=prev&page=dis1"> link. Maybe I will have to use a submit button, or can I use <html:link> to achieve the above