Is your getter method really as you posted it? That just returns the 
parameter it is passed. It should be this:

public AddressInfo getHomeAddress()
{
     return this.homeAddress;
}

Note the absence of the parameter. The rest looks fine, although I would 
advocate making the homeAddress member private instead of public.

--
Martin Cooper


At 10:46 AM 6/11/01, Chuck Stern wrote:
>Hi,
>
>I think I'm missing something here.  I have a bean that is available to my
>page in the request scope.  Within that I have another bean that has
>properties I want to display.  I'm trying to use the define tag to get a
>reference to the embedded bean and I'm getting the infamous:
>javax.servlet.jsp.JspException: No getter method for property homeAddress of
>bean policyHolderInfo
>
>Here's the code -
>In my bean policyHolderInfo bean attached to the request obj:
>
>public AddressInfo homeAddress;
>
>public AddressInfo
>getHomeAddress(AddressInfo homeAddress)
>{
>     return homeAddress;
>}
>
>public void
>setHomeAddress( AddressInfo homeAddress)
>{
>     this.homeAddress = homeAddress;
>}
>
>My jsp tag is:
><bean:define id="policyHolderAddress" name="policyHolderInfo"
>property="homeAddress" />
>
>All other getters on the policyHolderInfo bean work just fine.
>
>Am I doing something wrong or is there another way to do this?  Any
>suggestions would be appreciated.
>Thanks,
>Chuck


Reply via email to