struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "fea jabi" <zy...@hotmail.com>
Subject Re: No getter method servlet Exception. using DynaActionForm
Date Wed, 16 Nov 2005 15:38:14 GMT
I have right ones but still getting the same error.


>From: Ext.Ilitia2@dinosol.es
>Reply-To: "Struts Users Mailing List" <user@struts.apache.org>
>To: "Struts Users Mailing List" <user@struts.apache.org>
>CC: user@struts.apache.org
>Subject: Re: No getter method servlet Exception. using DynaActionForm
>Date: Wed, 16 Nov 2005 16:19:18 +0100
>
>
>Hi,
>
>       I'm not sure, but I think you have several mistakes...
>
>       First, You have put "CustForm" in the property name of the form, but
>in the property name of the action you have put "SetupForm".... and in the
>class you have put "CustForm" again....
>
>       In the jsp you have put "<html:form action="PostCust.do" method
>="post">".... I think the correct  would be
>"<html:form action="PrepareCustAction.do"..." ...
>
>       Not sure if that is the problem, but...
>
>
>
>
>                       "fea jabi"
>                       <zyxrm@hotmail.co        To:       
>user@struts.apache.org
>                       m>                       cc:
>                                                bcc:
>                       16/11/2005 15:52         Subject:  No getter method 
>servlet Exception. using DynaActionForm
>                       Please respond to
>                       "Struts Users
>                       Mailing List"
>
>
>
>
>
>
>
>
>
>I am trying to use the DynaActionForm.
>
>     <form-bean
>         name="CustForm"
>         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="/PrepareCustAction"
>         type="com.actions.PrepareCustAction"
>         name="SetupForm"
>         scope="session"
>         validate="false"
>         input="/pages/Setup.jsp">
>         <forward name="success" path="/pages/Cust.jsp" redirect="false"/>
>      </action>
>
>
>
>public class PrepareCustAction extends Action {
>
>     public ActionForward execute(ActionMapping mapping,
>                                ActionForm form,
>                                HttpServletRequest request,
>                                HttpServletResponse response)
>                        throws ServletException, IOException{
>         DynaActionForm setupForm = (DynaActionForm) form;
>
>         ModuleConfig moduleConfig = RequestUtils.getModuleConfig(request,
>getServlet().getServletContext());
>         FormBeanConfig formConfig =
>moduleConfig.findFormBeanConfig("CustForm");
>         DynaActionFormClass dynaClass =
>DynaActionFormClass.createDynaActionFormClass(formConfig);
>
>         try {
>             setupForm = (DynaActionForm)dynaClass.newInstance();
>         }
>         catch (Exception e) {
>             //logger.error(e);
>         }
>
>
>         return mapping.findForward("success");
>     }
>
><html:form action="PostCust.do" method="post">
>             <table >
>..................................
>...................................
>                 <tr>
>                     <td>
>                         <bean:message key="lbl.customername"/>
><bean:message
>key="colon"/>
>                     </td>
>                     <td>
>                         <html:text property="custName" size="40"
>styleClass="invisibleInput" readonly="true" tabindex="-1"/>
>                     </td>
>                     <td></td>
>                 </tr>
>                 <tr></tr><tr></tr><tr></tr>
>                 <tr>
>                     <td>
>                         <bean:message key="lbl.typename"/> <bean:message
>key="colon"/>
>                     </td>
>                     <td>
>                         <html:text property="typeName" size="40" />
>                     </td>
>                     <td></td>
>                 </tr>
>                 <tr></tr><tr></tr><tr></tr>
>                 <!-- 3. Run Name Description -->
>                 <tr>
>                     <td>
>                         <bean:message key="lbl.typenamedescption"/>
><bean:message key="colon"/>
>                     </td>
>                     <td>
>                         <html:textarea property="typeNameDesc" />
>                     </td>
>                     <td></td>
>                 </tr>
>                 <tr></tr><tr></tr><tr></tr>
>                 <tr>
>                     <td>
>                         <bean:message key="lbl.confirm"/> <bean:message
>key="colon"/>
>                     </td>
>                     <td>
>                         <html:checkbox property="confirm" />
>                     </td>
>                     <td></td>
>                 </tr>
>.........................
>...........................
>    </table>
>
>I am just trying to launch the jsp. Later would like to prepopulate the
>formbean too.
>
>But when when trying to lauch the jsp getting the below error
>
>
>javax.servlet.ServletException: No getter method for property custName of
>bean org.apache.struts.taglib.html.BEAN
>
>org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
>
>
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
>
>
>what am I missing?
>
>Thanks.
>
>_________________________________________________________________
>Express yourself instantly with MSN Messenger! Download today - it's FREE!
>http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message