You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Luke Studley <Lu...@cerillion.com> on 2001/12/12 17:12:40 UTC

html:options

Hi all

This is my first post - so excuse me if it is really basic but I am trying
to get the html:options tag to work as documented. My code looks like:

<jsp:useBean id="nameTitles" scope="page" class="java.util.HashMap">
	<jsp:scriptlet>
	nameTitles.put("Mr",null);
	nameTitles.put("Mrs",null);
	nameTitles.put("Miss",null);
	</jsp:scriptlet>
</jsp:useBean>

.....

<html:options collection="nameTitles" property="key"/>


Where I am declaring a simple map and then trying to use it to populate the
option list. But I get the following error:

javax.servlet.jsp.JspException: No getter method available for property
personTitle for bean under name org.apache.struts.taglib.html.BEAN
	at
org.apache.struts.taglib.template.GetTag.doStartTag(GetTag.java:193)
	at org.apache.jsp.pagetempl$jsp._jspService(pagetempl$jsp.java:265)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)


What am I doing wrong???!

Luke

PS Tomcat 4.0.1, Struts latest nightly build (needed for validator).


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>