Oups, sorry this is the way you should do it: CreateClientForm updateForm = (CreateClientForm)form;
// populate the bean here updateForm.setXXX = "blah blah"; And you must have the bean in session scope (as you have) > -----Ursprungligt meddelande----- > Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Skickat: den 29 september 2005 11:38 > Till: user@struts.apache.org > Ämne: RE: prepopulating jsp page > > Do this in your action: > > CreateClientForm updateForm = new CreateClientForm(); > // populate the bean here > > // then > form = updateForm; > > When you say > > form = updateForm; > > what is my variable form of type? > > > > > -----Original Message----- > From: Ekberg Mats KONSULT [mailto:[EMAIL PROTECTED] > Sent: 29 September 2005 10:34 > To: 'Struts Users Mailing List' > Subject: SV: prepopulating jsp page > > > > > -----Ursprungligt meddelande----- > > Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > Skickat: den 29 september 2005 11:26 > > Till: user@struts.apache.org > > Ämne: prepopulating jsp page > > > > Hi, > > > > I am trying to pre-populate my JSP page with the values > returned from > > the database when a user edits a client. I have just > recently upgraded > > to Struts download 1.2.4. > > > > This is what I did before which worked: > > > > In my action class I created the form then populated it with > > the values > > from the DB. > > > > CreateClientForm updateForm = new CreateClientForm(); > > Do this in your action: > > CreateClientForm updateForm = new CreateClientForm(); > // populate the bean here > > // then > form = updateForm; > > > > > > > > My struts config sent the response to the jsp page where I > > displayed the > > values as follows > > > > <html:form action="/updateClient" > > name="createClientForm" > > type="com.medina.web.forms.CreateClientForm"> > > > > However in this new download the html tag library does not > have a tag > > for name. Thus I cannot add the name tag to the html:form tag. > > > > So my jsp now looks ike this: > > > > <html:form action="/updateClient"> > > > > and my struts config.xml : > > > > <action path="/updateClient" > > type="com.medina.web.action.UpdateClientAction" > > name="createClientForm" > > scope="session" > > parameter="update" > > input="/editClient.jsp"> > > <forward name="failure" path="/jsp/failure.jsp"/> > > <forward name="success" path="/jsp/success.jsp"/> > > </action> > > > > Can anyone please advise what I need to do to get these > > values into the > > jsp page as it appears empty. How do I get around this name tag? > > > > Thanks > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]