Its working now. Thank you very much for the replies. The problem was that the naming convention (it was like sStreet, sCity and the getter/setters were getStreet, getCity etc.)of my attributes and I did not initialize the inside bean in the ActionForm. Thanks & Regards, Chandra.
> To: user@struts.apache.org> From: [EMAIL PROTECTED]> Subject: Re: Problem > from defining JavaBean as an attribute inside ActionForm> Date: Thu, 3 Jul > 2008 14:56:09 -0400> > 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]> _________________________________________________________________ Missed your favourite programme? Stop surfing TV channels and start planning your weekend TV viewing with our comprehensive TV Listing http://entertainment.in.msn.com/TV/TVListing.aspx