G
goa_head
I've seen this problem posted a lot and have recently ran into it.
Trying the various suggestions hasn't worked...
I have an ArrayList which gets put into the Session object by one of
my classes via session.setAttribute. The ArrayList is populated with
various "Forum" objects. I try to iterate through the arraylist with
this on a JSP:
<logic:iterate id="forums" name="forumList">
<tr><td colspan=2><FONT face="Verdana" size="-2">
<b><bean:write name="forums" property="forumName"/></b><br>
</td></tr>
</logic:iterate>
That makes me get the "No getter method for property forumName of bean
forums" error. If I remove the bean:write statement and replace it
with static text, the text gets repeated for the number of items on
the ArrayList, so I *know* it's looping through the objects. It's just
not seeing getForumName().
The arraylist is composed of various "Forum" objects these look like
the following:
------------------------------
public class Forum {
//Variable declarations
private String forumName;
/** Creates a new instance of Forum */
public Forum(String newForumName) {
this.forumName= newForumName;
} //end Forum
public String getForumName() {
return this.forumName;
} //end getForumName
public void setForumName(String newForumName) {
this.forumName = newForumName;
} //end setForumName
} //end class Forum
Trying the various suggestions hasn't worked...
I have an ArrayList which gets put into the Session object by one of
my classes via session.setAttribute. The ArrayList is populated with
various "Forum" objects. I try to iterate through the arraylist with
this on a JSP:
<logic:iterate id="forums" name="forumList">
<tr><td colspan=2><FONT face="Verdana" size="-2">
<b><bean:write name="forums" property="forumName"/></b><br>
</td></tr>
</logic:iterate>
That makes me get the "No getter method for property forumName of bean
forums" error. If I remove the bean:write statement and replace it
with static text, the text gets repeated for the number of items on
the ArrayList, so I *know* it's looping through the objects. It's just
not seeing getForumName().
The arraylist is composed of various "Forum" objects these look like
the following:
------------------------------
public class Forum {
//Variable declarations
private String forumName;
/** Creates a new instance of Forum */
public Forum(String newForumName) {
this.forumName= newForumName;
} //end Forum
public String getForumName() {
return this.forumName;
} //end getForumName
public void setForumName(String newForumName) {
this.forumName = newForumName;
} //end setForumName
} //end class Forum