DynaActionForm in struts help
843838Nov 16 2005 — edited Nov 17 2005Getting no getter method forproperty custName of bean ...... servlet Exception.
When I debug thru the code in Action
DynaActionForm setupForm = (DynaActionForm) form;
System.out.println("In PrepareSetupAction : setupform is : " + setupForm);
The setupForm is null. I am not sure why this is null. Everything seams to be right.
What am I missing?
<form-bean
name="SetupForm"
type="org.apache.struts.action.DynaActionForm" dynamic="true">
<form-property name="custName" type="java.lang.String"/>
<form-property name="typeName" type="java.lang.String"/>
<form-property name="typeNameDesc" type="java.lang.String"/>
<form-property name="confirm" type="java.lang.boolean" initial="true"/>
</form-bean>
<action
path="/PrepareSetupAction"
type="com.actions.PrepareSetupAction"
name="SetupForm"
scope="session"
validate="false"
input="/pages/Setup.jsp">
<forward name="success" path="/pages/Setup.jsp" redirect="false"/>
</action>
public class PrepareSetupAction extends Action {
/** Creates a new instance of PrepareSetupAction */
public PrepareSetupAction() {
}
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException{
DynaActionForm setupForm = (DynaActionForm) form;
System.out.println("In PrepareSetupAction : setupform is : " + setupForm);
return mapping.findForward("success");
}
}
Thanks.