Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

DynaActionForm in struts help

843838Nov 16 2005 — edited Nov 17 2005
Getting 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 15 2005
Added on Nov 16 2005
5 comments
223 views