> -----Original Message----- > From: Caroline Jen [mailto:[EMAIL PROTECTED] > Sent: Friday, September 10, 2004 2:30 PM > To: Struts Users Mailing List > Subject: Re: [SOLVED]Cannot retrieve definition for form bean null > > > It is a > > > type="org.apache.struts.validator.DynaValidatorForm"> > > > Is the form bean class properly set up?
Not the form bean class... The action definition in struts-config. <action path="/borrowerInfo" name="yourFormName" <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<need this!!!!!!! type="com.sssc.csr.web.actions.ShowBorrowerAction"> <forward name="success" path="borrowerInfo"></forward> </action> You have to tell the action definition what form your using, regardless of whether it is DynaForm, ValidatorForm or ActionForm. When one of the <html: tags gets executed it looks for the <html:form tag, grabs the action and then looks in struts-config for the form name THEN it creates the tag. You don't have a name parameter, so it's saying that it's null. > > > --- Matt Bathje <[EMAIL PROTECTED]> wrote: > > > Caroline - the downside of this approach is now some > > of the struts > > features that require the <html:formelement> tags > > won't work. You > > haven't solved the problem so much as put a crappy > > bandaid on it I think. > > > > I haven't been following this thread, but based on > > the error message you > > are getting, I would guess that the form definition > > for messageForm is > > not setup correctly. > > > > Also, I'm assuming you are using a dyna form, and > > that if you aren't you > > have a properly setup form bean class. > > > > > > Matt > > > > > > > > Caroline Jen wrote: > > > > > I use the HTML tag <textarea> to make it work. > > > If I use <html:textarea>, I get 'cannot retrieve > > > definition for form bean null' > > > --- Jim Barrows <[EMAIL PROTECTED]> wrote: > > > > > > > > >> > > >>>-----Original Message----- > > >>>From: Caroline Jen [mailto:[EMAIL PROTECTED] > > >>>Sent: Friday, September 10, 2004 12:37 PM > > >>>To: Struts Users Mailing List > > >>>Subject: RE: [SOLVED]Cannot retrieve definition > > >> > > >>for form bean null > > >> > > >>> > > >>>Hi, I have found the mistake. > > >>> > > >>>The mistake is that <html:textarea> is not a > > >> > > >>struts > > >> > > >>>tag equivalent to HTML <textarea> tag. > > >> > > >>Are you sure? How else do you generate a textarea > > >>field using struts? > > >> > > >> > > >> > > >>>--- Caroline Jen <[EMAIL PROTECTED]> wrote: > > >>> > > >>> > > >>>>I experimented a little bit: > > >>>> > > >>>>1. I changed all struts tags to html tags in my > > >>>>messageForm.jsp and I also excluded the opening > > >>>><html:form> and closing </html:form> tag. > > >>>> > > >>>> The action mapping shown below works fine. I > > >> > > >>am > > >> > > >>>>able to see the form that I want to display in > > >> > > >>the > > >> > > >>>>browser. > > >>>> > > >>>> <action > > >>>> path="/MailMessage" > > >>>> parameter=".message.Form" > > >>>> > > >>>>type="org.apache.struts.actions.ForwardAction"/> > > >>>> > > >>>>2. I then added the opening <html:form> in the > > >>>>beginning of the messageForm.jsp and the closing > > >>>></html:form> tag at the end of the > > >> > > >>messageForm.jsp. > > >> > > >>>> I got the error message 'cannot retrieve > > >>>>definition for form bean null' > > >>>> > > >>>>3. the <html:form> tag looks like (copied from > > >> > > >>my > > >> > > >>>>code): > > >>>> > > >>>> <html:form action="/message/SendMessage"> > > >>>> > > >>>>4. the action mapping in the struts-config.xml > > >> > > >>looks > > >> > > >>>>like (copied from my code): > > >>>> > > >>>> <action > > >>>> path="/message/SendMessage" > > >>>> type="org.dhsinfo.message.SendMessage" > > >>>> name="messageForm" > > >>>> scope="request" > > >>>> validate="false" > > >>>> input=".message.Form"> > > >>>> <forward > > >>>> name="success" > > >>>> > > >>>>path="/confirmation/messageForwarded.jsp"/> > > >>>> </action> > > >>>> > > >>>>5. I have not yet prepared the SendMessage.java > > >> > > >>in > > >> > > >>>>the > > >>>>AppRoot/org/dhsinfo/message folder yet. > > >>>> > > >>>>What could be the cause of the problem? > > >>>> > > >>>> > > >>>>--- Jim Barrows <[EMAIL PROTECTED]> wrote: > > >>>> > > >>>> > > >>>>> > > >>>>>>-----Original Message----- > > >>>>>>From: Caroline Jen > > >> > > >>[mailto:[EMAIL PROTECTED] > > >> > > >>>>>>Sent: Friday, September 10, 2004 10:54 AM > > >>>>>>To: Struts Users Mailing List > > >>>>>>Subject: RE: [HELP]Cannot retrieve > > >> > > >>definition > > >> > > >>>>for > > >>>> > > >>>>>form bean null > > >>>>> > > >>>>>> > > >>>>>>Yes, I copied and pasted the code. I did > > >> > > >>not > > >> > > >>>>type > > >>>> > > >>>>>>those code while composing my request for > > >> > > >>help > > >> > > >>>>>message > > >>>>> > > >>>>>>on the struts-user forum. > > >>>>> > > >>>>>Okay then you have a problem in the way your > > >>>> > > >>>>action > > >>>> > > >>>>>is declared. You need to also declare the > > >> > > >>form > > >> > > >>>>>being used with that action. See the > > >>>> > > >>>>documentation > > >>>> > > >>>>>for details. > > >>>>> > > >>>>> > > >>>>>>--- Jim Barrows <[EMAIL PROTECTED]> wrote: > > >>>>>> > > >>>>>> > > >>>>>>> > > >>>>>>>>-----Original Message----- > > >>>>>>>>From: Caroline Jen > > >>>>> > > >>>>>[mailto:[EMAIL PROTECTED] > > >>>>> > > >>>>>>>>Sent: Friday, September 10, 2004 9:56 AM > > >>>>>>>>To: [EMAIL PROTECTED] > > >>>>>>>>Subject: [HELP]Cannot retrieve > > >> > > >>definition > > >> > > >>>>for > > >>>> > > >>>>>form > > >>>>> > > >>>>>>>bean null > > >>>>>>> > > >>>>>>>> > > >>>>>>>>Hi, it is me again. > > >>>>>>>> > > >>>>>>>>I still have problem with displaying my > > >> > > >>JSP. > > >> > > > === message truncated === > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail Address AutoComplete - You start. We finish. > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > 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]