[ http://issues.apache.org/struts/browse/STR-873?page=all ] David Evans closed STR-873: --------------------------- Resolution: Not A Problem > select tag doesn't work with multiple selects > --------------------------------------------- > > Key: STR-873 > URL: http://issues.apache.org/struts/browse/STR-873 > Project: Struts Action 1 > Type: Bug > Components: Unknown > Versions: 1.0.2 > Environment: Operating System: All > Platform: PC > Reporter: Martin Grebac > Assignee: Martin Cooper > > I've got following code in my Form bean: > public class ModulePathForm extends ActionForm{ > private ArrayList folders; > private String[] selectedFolders; > > public ModulePathForm(){ > super(); > folders = null; > selectedFolders = null; > } > public ArrayList getFolders() { > return this.folders; > } > > public void setFolders(ArrayList folders) { > this.folders = folders; > } > > public String getSelectedFolders(int index) { > return this.selectedFolders[index]; > } > > public String[] getSelectedFolders() { > return this.selectedFolders; > } > > public void setSelectedFolders(int index, String selectedFolders) { > this.selectedFolders[index] = selectedFolders; > } > > public void setSelectedFolders(String[] selectedFolders) { > this.selectedFolders = selectedFolders; > } > } > and following code in my jsp: > > > > The jsp page shows OK with the options filled, but when I press Submit (I may > select one, two, or more, it doesn't depend), I get following exception: > javax.servlet.ServletException: BeanUtils.populate > at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774) > at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061) > at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564) > at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > at > org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:223) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) > at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) > at java.lang.Thread.run(Thread.java:484) > root cause > java.lang.IllegalArgumentException: argument type mismatch > at java.lang.reflect.Method.invoke(Native Method) > at org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:988) > at org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:904) > at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932) > at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509) > at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:772) > at org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061) > at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564) > at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > at > org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:223) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344) > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163) > at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566) > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) > at > org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011) > at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106) > at java.lang.Thread.run(Thread.java:484) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira