tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Bergsten <>
Subject Re: c:set can't set JavaBean property
Date Thu, 19 Dec 2002 03:00:46 GMT
Mike Cantrell wrote:
> Okay, I think the problem is that my getter method returns a String but 
> the setterMethod takes an integer:
>    public String getDay();
>    public void setDay(int day);
> If I change it to return an integer, it works fine.. I find this 
> especially weird since getDay() isn't ever called in any of the code.
 > [...]

That's the problem, and it doesn't matter if you call one or the other
or not. The JavaBeans rules that defines what's a property says that
both the getter and the setter must be of the same type, if they are
both implemented.

Hans Bergsten                                <>
Gefion Software                       <>
Author of O'Reilly's "JavaServer Pages", covering JSP 1.2 and JSTL 1.0
Details at                                    <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message