title: Struts2 list couldn't be resolved
body: <p>please help me. I am facing this error for 3 days. I have searched all the examples on the web, but I couldn't  figured it out.</p>
  
  <p>These are my files:</p>
  
  <blockquote>
    <p>struts.xml</p>
  </blockquote>
  
  <pre><code>...
  &lt;action name="menu"  class="com.struts.actions.MenuAction" method="asdf"&gt;
  &lt;result name="success" type="tiles"&gt;struts2tiles.home&lt;/result&gt;
  &lt;/action&gt;
  ...
  </code></pre>
  
  <blockquote>
    <p>menu2.jsp</p>
  </blockquote>
  
  <pre><code>....
  &lt;body&gt;
  &lt;s:form action="menu"&gt;
      &lt;s:checkboxlist label="What's your favor color" list="colors" name="colors" /&gt;
  
  &lt;s:submit value="submit" name="submit" /&gt;
  
  &lt;/s:form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <blockquote>
    <p>MenuAction</p>
  </blockquote>
  
  <pre><code>public class MenuAction extends ActionSupport {
      private ArrayList&lt;String&gt; colors;
      private String yourColor;
  
      public ArrayList&lt;String&gt; getColors() {
          return colors;
      }
  
      public void setColors(ArrayList&lt;String&gt; colors) {
          this.colors = colors;
      }
  
      public String getYourColor() {
          return yourColor;
      }
  
      public void setYourColor(String yourColor) {
          this.yourColor = yourColor;
      }
  
      public String asdf() {
          colors = new ArrayList&lt;String&gt;();
          colors.add("red");
          colors.add("yellow");
          colors.add("blue");
          colors.add("green");
  
          return SUCCESS;
      }
  
      @Override
      public String execute() {
          System.out.println("execute menu action");
          colors = new ArrayList&lt;String&gt;();
          colors.add("red");
          colors.add("yellow");
          colors.add("blue");
          colors.add("green");
  
          return SUCCESS;
      }
  
  }
  </code></pre>
  
  <p>Anything I did, still the same error persists:</p>
  
  <pre><code>Dec 22, 2011 10:56:44 PM org.apache.catalina.core.ApplicationDispatcher invoke
  SEVERE: Servlet.service() for servlet jsp threw exception
  tag 'checkboxlist', field 'list', name 'colors': The requested list key 'colors' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
      at org.apache.struts2.components.Component.fieldError(Component.java:237)
      at org.apache.struts2.components.Component.findValue(Component.java:358)
      at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80)
      at org.apache.struts2.components.UIBean.evaluateParams(UIBean.java:856)
      at org.apache.struts2.components.UIBean.end(UIBean.java:510)
      at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
      at org.apache.jsp.jsp.common.menu2_jsp._jspx_meth_s_005fcheckboxlist_005f0(menu2_jsp.java:166)
      at org.apache.jsp.jsp.common.menu2_jsp._jspx_meth_s_005fform_005f0(menu2_jsp.java:122)
      at org.apache.jsp.jsp.common.menu2_jsp._jspService(menu2_jsp.java:84)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
      at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:927)
      at org.apache.jasper.runtime.PageContextImpl.doInclude(PageContextImpl.java:684)
      at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:678)
      at org.apache.tiles.jsp.context.JspTilesRequestContext.include(JspTilesRequestContext.java:80)
      at org.apache.tiles.jsp.context.JspTilesRequestContext.dispatch(JspTilesRequestContext.java:73)
      at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
      at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:88)
      at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:283)
      at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:140)
      at org.apache.tiles.jsp.taglib.InsertAttributeTag.render(InsertAttributeTag.java:117)
      at org.apache.tiles.jsp.taglib.RenderTagSupport.execute(RenderTagSupport.java:154)
      at org.apache.tiles.jsp.taglib.RoleSecurityTagSupport.doEndTag(RoleSecurityTagSupport.java:75)
      at org.apache.tiles.jsp.taglib.ContainerTagSupport.doEndTag(ContainerTagSupport.java:80)
      at org.apache.jsp.jsp.common.mainLayout_jsp._jspx_meth_tiles_005finsertAttribute_005f2(mainLayout_jsp.java:181)
      at org.apache.jsp.jsp.common.mainLayout_jsp._jspService(mainLayout_jsp.java:94)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
      at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
      at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
      at org.apache.tiles.servlet.context.ServletTilesRequestContext.include(ServletTilesRequestContext.java:217)
      at org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:177)
      at org.apache.tiles.context.TilesRequestContextWrapper.dispatch(TilesRequestContextWrapper.java:72)
      at org.apache.struts2.tiles.StrutsTilesRequestContext.dispatch(StrutsTilesRequestContext.java:88)
      at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:606)
      at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246)
      at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
      at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
      at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
      at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
      at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:138)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:270)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:145)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:171)
      at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
      at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
      at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
      at org.apache.struts2.components.ActionComponent.executeAction(ActionComponent.java:291)
      at org.apache.struts2.components.ActionComponent.end(ActionComponent.java:173)
      at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
      at org.apache.jsp.index_jsp._jspx_meth_s_005faction_005f0(index_jsp.java:108)
      at org.apache.jsp.index_jsp._jspService(index_jsp.java:76)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:389)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>Anyone has an idea?</p>