I am new to struts so excuse me if this is an incredibly naïve question, I
have searched through the archive put am not sure what to even search on.

I have multiple beans for a form an example would be contact.jsp where the
ContactForm.java has the get and set methods for the contact e.g. firstName,
lastName etc, I have a bean AddressForm to handle the contact’s address/s
with get and set methods (adress1, address2 and so on) and a bean for the
phone details (PhoneForm.java) with the corresponding phone information.

<html:form action="contact">
<html:text property="firstName" size="30" maxlength="30" />
<html:text name=”addressForm” property="address1" size="30" maxlength="30"
/>
<html:text name=”phoneForm” property="phoneNumber" size="30" maxlength="30"
/>
…

In struts-config I have
<action    path="/contact"
               type="com.blah.blah.ContactAction"
               name="contactForm"
               scope="request"
               validate="true"
               input="/contact.jsp">

<form-bean name="contactForm"  type="com.blah.blah.ContactForm"/>

<form-bean name="addressForm" type="com. blah.blah.AddressForm"/>
<form-bean name="phoneForm" type="com. blah.blah.PhoneForm"/>


However the result is “Cannot find bean addressForm in scope null”.

If you could point me to some link with information it would be greatly
appreciated.

TIA

Joe

Reply via email to