When I run the code I get the following(first few lines of trace:
javax.servlet.jsp.JspException: No getter method available for property
leagueLabels for bean under name null
at
org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:384)
at
org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:248)
at
org.apache.jsp.playersearch_jsp._jspx_meth_html_options_0(playersearch_jsp.java:310)
at
org.apache.jsp.playersearch_jsp._jspx_meth_html_select_0(playersearch_jsp.java:283)
at
org.apache.jsp.playersearch_jsp._jspService(playersearch_jsp.java:153)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92)
The HTML looks like this:
<jsp:useBean id="systemBean" class="com.stats.SystemBean"
scope="session"/>
<tr>
<td>
<bean:message key="label.search.leagueName"/>:
</td>
<td>
<html:select property="txtLeague" >
<html:options name="systemBean" property="leagueValues"
labelProperty="leagueLabels"/>
</html:select>
</td>
</tr>
Here is the bean getter methods found in the class systemBean:
public ArrayList getLeagueLabels() {
return this.leagueLabels;
}
public ArrayList getLeagueValues() {
return this.leagueValues;
}
I don't really understand why it is failing to find SystemBean and
shows null in the trace. Any help is appreciated. Thanks.
I have been trying to determine the answer to this problem for a week
and not making much progress. I am new to Struts and trying to add an
Options box on a form.
When I run the code I get the following(first few lines of trace:
javax.servlet.jsp.JspException: No getter method available for property
leagueLabels for bean under name null
at
org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:384)
at
org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:248)
at
org.apache.jsp.playersearch_jsp._jspx_meth_html_options_0(playersearch_jsp.java:310)
at
org.apache.jsp.playersearch_jsp._jspx_meth_html_select_0 (playersearch_jsp.java:283)
Zaid