Again doing this I think will throw a class cast exception. localvariable = (CreateClientForm)form
I already have the form beans elements in my config.xml -----Original Message----- From: Vijaya S [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 10:49 To: Struts Users Mailing List Subject: RE: prepopulating jsp page In your struts-config.xml, add a <form-beans> section <form-bean name="createClientForm type="com.medina.web.forms.CreateClientForm" /> </form-beans> Then in your action, if (form != null) { localvariable = (CreateClientForm)form } now you can build your form bean properties as localvariable.set metods. Vijaya -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 2:56 PM To: user@struts.apache.org Subject: 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(); 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]