Hi all, Well I just spent a lot of time trying to address a "No Getter Method for Property..." error and though I would post my findings here for posterity. My code was structured as follows when the error occured: 1. I had defined an abstract class C1 that in turn defined an abstract method M1 as follows:
2. I had also defined several package-scoped concrete classes C2, C3, etc. which extended C1 and its abstract M1. They took on the following form:
These classes are created using a Factory class. 3. I create a collection K populated with instances of abstract class C1. 4. When I try to iterate over collection K in my JSP page and try to display the value returned by method M1, a "No Getter Method for Property..." error arises. I don't really know why it arises as the method is defined in C1, albeit abstractly. ***** Anyway, to make a long story short, the solution to the problem was to make method M1 a concrete method in abstract class C1. Only after I do this can I display the value returned by M1. I guess I don't know enough about the JavaBeans specification to understand why the getter method has to be concretely defined in abstract class C1. In any event, this is a COMMON error that many Struts developers encounter so I hope this posting will prevent a lot of frustration to other users. Cheers, Darryl
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads