You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shaun Roach <sh...@wantcomputerhelp.com> on 2003/12/17 21:12:54 UTC
Problem
Hello, I have been using struts for awhile, but after I started a new project last week, I began having a problem with it.
It seems like struts cannot find the getter methods in my beans. For instance, when I try the following jsp page:
<html:html>
<logic:iterate id="statLine" name="playerDisplay" property="playerStats" type="com.rototheory.beans.StatLine">
<br>
<bean:write name="statLine" property="lineDate"/>
</logic:iterate>
</html:html>
Nothing is generated, ( suggesting that it didn't find the lineDate getter ).
However, if I use the following code:
<html:html>
<logic:iterate id="statLine" name="playerDisplay" property="playerStats" type="com.rototheory.beans.StatLine">
<br>
<%= statLine.getLineDate() %>
</logic:iterate>
</html:html>
The correct output is generated. I am having similar problems with struts finding collections that I am trying to iterate over. Does anyone have any idea of what might be causing the struts to not find my bean's getters?
Thanks for your help,
Shaun Roach
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
RE: Problem
Posted by Robert Taylor <rt...@mulework.com>.
Did you include the Struts bean tag-lib directive?
In other words if you view source, do you see
<bean:write name="statLine" property="lineDate"/>
?
robert
> -----Original Message-----
> From: Shaun Roach [mailto:shaun@wantcomputerhelp.com]
> Sent: Wednesday, December 17, 2003 3:13 PM
> To: struts-user@jakarta.apache.org
> Subject: Problem
>
>
> Hello, I have been using struts for awhile, but after I started a
> new project last week, I began having a problem with it.
>
> It seems like struts cannot find the getter methods in my beans.
> For instance, when I try the following jsp page:
>
> <html:html>
> <logic:iterate id="statLine" name="playerDisplay"
> property="playerStats" type="com.rototheory.beans.StatLine">
> <br>
> <bean:write name="statLine" property="lineDate"/>
> </logic:iterate>
> </html:html>
>
>
> Nothing is generated, ( suggesting that it didn't find the
> lineDate getter ).
> However, if I use the following code:
>
> <html:html>
> <logic:iterate id="statLine" name="playerDisplay"
> property="playerStats" type="com.rototheory.beans.StatLine">
> <br>
> <%= statLine.getLineDate() %>
> </logic:iterate>
> </html:html>
>
>
> The correct output is generated. I am having similar problems
> with struts finding collections that I am trying to iterate over.
> Does anyone have any idea of what might be causing the struts to
> not find my bean's getters?
>
> Thanks for your help,
>
> Shaun Roach
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org