struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Colson" <>
Subject Bean Introspection and <bean:write> tag
Date Fri, 06 Jul 2001 19:12:11 GMT
As per the bean: struts API docs, I've included an "Employee" type object
into the request scope called "emp".

emp can get/set the "mLastName" property using getLastName() and

However - when I try the following

<bean:write name="emp" property="LastName"/>

I'm told that there is no "getter" method
javax.servlet.ServletException: No getter method for property LastName of

If I make the property initial lower case, it works fine:
<bean:write name="emp" property="lastName"/>

The Bean Spec Section 8.8 says this about capitalization:
So for example, “FooBah” becomes “fooBah”
So for example, “LastName” becomes “lastName”
I tried adding the accessor "getlastName()" to my Employee class - still

Property   -> get method    : result
"lastName" -> getLastName() : OK
"LastName" -> getLastName() : Fails
"LastName" -> getlastName() : Fails
"LastName" -> get?????()

I searched the archives and read more of the bean spec - but didn't pull up
anything useful on this. :-(


View raw message