You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by alex <zh...@alegria.co.jp> on 2001/04/24 06:56:05 UTC
its very strange.
hello all.
i found a problem, i am not sure whether its a bug in struts.
but i really dont understand why this happened.
i created one bean which extended from ActionForm named as ProfileForm.
and one variable named as "fName"
class final class ProfileForm extends ActionForm {
private String fName;
public void setFName(String fName) {
this.fName = fName;
}
public String getFName() {
return this.fName;
}
}
i got the following error message when i try to access fName property in jsp
.
"javax.servlet.jsp.JspException: No getter method for property fName of bean
org.apache.struts.taglib.html.BEAN"
buf if i change the property name to selfName, there are no such kind
problem.
i am confused.
thank in advance.
redbeebird
Re: its very strange.
Posted by Jean-Noel Ribette <je...@improve.fr>.
This is due to the javabean convention. If the method name begins with two uppercase letters, the property name is the
same as the method name.
For example getXXX() => property XXX.
getXxX() => xxX
There are more messages about this problem on the mail archives.
Jean-Noël
----- Original Message -----
From: alex <zh...@alegria.co.jp>
To: <st...@jakarta.apache.org>
Sent: Tuesday, April 24, 2001 6:56 AM
Subject: its very strange.
> hello all.
>
> i found a problem, i am not sure whether its a bug in struts.
> but i really dont understand why this happened.
>
> i created one bean which extended from ActionForm named as ProfileForm.
> and one variable named as "fName"
>
> class final class ProfileForm extends ActionForm {
> private String fName;
>
> public void setFName(String fName) {
> this.fName = fName;
> }
>
> public String getFName() {
> return this.fName;
> }
> }
>
> i got the following error message when i try to access fName property in jsp
> .
> "javax.servlet.jsp.JspException: No getter method for property fName of bean
> org.apache.struts.taglib.html.BEAN"
>
>
> buf if i change the property name to selfName, there are no such kind
> problem.
> i am confused.
>
> thank in advance.
>
> redbeebird
>
>
>