I am a bit stuck on how to get the values i populated in a form bean in a action class to be displayed in my JSP.
I want to edit a user. Thus the user selects edit from the search screen and it goes to the editaction.class. In this class I populate a form bean lets call it editForm bean and put this into the session using the following code:
The above action is called from the search page when i click the link edit. I then put the createClientForm form in the session in this action class with the code posted previously. Should I be using actionClientForm here and why? as this does not hold the info I want displayed
A couple of things. First I don't think you need to manually create and set the EditForm in the request. If you have defined the form in struts-config.xml and associated it with your action then it will be created automatically by struts and made available to you in the execute method.
However your example should still work. I think the problem there is that you have put the form under "updateForm" but in the JSP the action is "updateClient" which uses the form "createClientForm".
Hope that helps.
Ryan Dillon<br />Code Canvas Technologies<br />RapidJ - Rapid Java Web Development<br /><a href="http://www.codecanvas.com.au/rapidj/" target="_blank" rel="nofollow">http://www.codecanvas.com.au/rapidj/</a>
Joined: May 08, 2005
thats what it was i was referencing the wrong form when adding to the session.
subject: Retrieving prepopulated form values in jsp