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.

This

time, the error message is:

'[ServletException

in:/frame/content/messageForm.jsp]

Cannot retrieve definition for form bean

null'

1. I click on this link:

<html:link action="/MailMessage">Send
Message</html:link>

2. the action mapping in

struts-config.xml

is:

<action
path="/MailMessage"
parameter=".message.Form"



type="org.apache.struts.actions.ForwardAction"/>

You need to look here for the problem.

Assuming

you

copied and pasted this.



What am I missing this time?


---------------------------------------------------------------------

To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]





_______________________________ Do you Yahoo!? Shop for Back-to-School deals on Yahoo!

Shopping.

http://shopping.yahoo.com/backtoschool



---------------------------------------------------------------------

To unsubscribe, e-mail:

[EMAIL PROTECTED]

For additional commands, e-mail:

[EMAIL PROTECTED]


=== message truncated ===



                
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
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]



Reply via email to