Oh, and another thought: are you initializing ActionForm's empAddress
field somewhere? It may cause problems if it is null when Struts tries
to set its properties. Struts 2 can automatically create instances of
beans in that situation, but Struts 1 doesn't.
L.
Laurie Harper wrote:
What you have below all looks fine; it should work as you expected. What
does your form bean definition look like? Is the form bean correctly
referenced by the action mapping the form is submitted to? Post the
relevant bits of configuration and the full stack trace; maybe that will
allow someone to see the problem.
L.
Chandramouli P wrote:
Hi,
I have the below scenario:
I have a java bean as below:
public class Address
{
private String city;
private String state;
and public getters/setters for the above attributes;
}
and I have the ActionForm as below:
import Address;
public class EmpForm extends ActionForm
{
private String name;
private String empID;
private Address empAddress;
and public getters/setters for the aboev attribute;
}
We are using Struts 1.2.9 and writing the JSP page as below:
<html:form action="/sampleAction.do">
<html:text property="name"/>
<html:text property="empID"/>
<html:text property="empAddress.city"/>
<html:text property="empAddress.state"/>
</html:form>
I am getting the below error while submitting the form:
E SRVE0026E: [Servlet Error]-[BeanUtils.populate]:
java.lang.IllegalArgumentException: No bean specified at
org.apache.commons.beanutils.PropertyUtils..getPropertyDescriptor(PropertyUtils.java(Compiled
Code))
I have read somewhere that Struts version I am using does support the
nested attributes for the <html:text> and other tags. Are there any
errors in the above code? Please help.
Thanks & Regards,
Chandra.
_________________________________________________________________
Post free property ads on Yello Classifieds now! www.yello.in
http://ss1.richmedia.in/recurl.asp?pid=221
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]