Your bean looks correct... It is probably something to do with the JSP tags. I'm not an expert of the Struts tags (I'm more on the Java side), but perhaps the tag does not handle the property as indexed. There is an attribute "indexed" on the html:select tag, but the documentation says it's used only within an iterate tag. Maybe you should try to use an iterate tag. I found this post that may be relevant to you, check it out: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg12084.html. Also I've seen a post that talks about the support for indexed properties on the select tag being available in the nightly build only, check this: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15026.html.
Hope that will help solve your problem. Fr. -----Original Message----- From: Fredrik Östling [mailto:[EMAIL PROTECTED]] Sent: 18 January 2002 09:09 To: [EMAIL PROTECTED] Subject: Indexed properties and BeanUtils.populate exception. I have multiple select tag in my JSP as follows: <html:select multiple="true" size="5" property="testStrings"> <html:options collection="appellationTypes" property="name" labelProperty="name"/> </html:select> In my form bean I have these getters and setters: public void setTestStrings( String[] in ) { System.out.println("setTestStrings( String[] in )"); testStrings = in; } public void setTestStrings( int index, String in ) { System.out.println("setTestStrings( int index, String in )"); testStrings[index] = in; } public String[] getTestStrings() { System.out.println("getTestStrings()"); return testStrings; } public String getTestStrings( int index ) { System.out.println("getTestStrings( int index )"); return testStrings[index]; } The problem is that if I select one or more fields in the multiple select box and post it I get this annoying Exception: javax.servlet.ServletException: BeanUtils.populate Struts should handle indexed properties, shouldnt it? What am I doing wrong? I dont know how to debug this either. / Fredrik _____________________________________________________ Hitta snörapporter... från 500 olika skidorter i Europa på http://se.snow.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> ************************************************************************ The information in this email is confidential and is intended solely for the addressee(s). Access to this email by anyone else is unauthorised. If you are not an intended recipient, please notify the sender of this email immediately. You should not copy, use or disseminate the information contained in the email. Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Capco. http://www.capco.com *********************************************************************** -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>