title: The list attribute in select tag can't be resolved when using ModelDriven interface in Struts 2
body: <p>I use the interface <code>ModelDriven</code> in my Struts 2 application. I have a problem rendering the page because I always get an error:</p>
  <pre><code>19 nov. 2013 11:23:12 org.apache.catalina.core.StandardWrapperValve invoke
  GRAVE: &quot;Servlet.service()&quot; pour la servlet jsp a généré une exception
  tag 'select', field 'list': The requested list key 'listeItems' 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:240)
          at org.apache.struts2.components.Component.findValue(Component.java:333)
          at org.apache.struts2.components.ListUIBean.evaluateExtraParams(ListUIBean.java:80)
  </code></pre>
  <p>I don't know where is the error so I call distress to the community.</p>
  <p><strong><code>struts.xml</code>:</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
   
  &lt;!DOCTYPE struts PUBLIC
      &quot;-//Apache Software Foundation//DTD Struts Configuration 2.0//EN&quot;
      &quot;http://struts.apache.org/dtds/struts-2.0.dtd&quot;&gt;
  &lt;struts&gt;
      &lt;constant name=&quot;struts.devMode&quot; value=&quot;false&quot; /&gt;
      &lt;constant name=&quot;struts.action.extension&quot; value=&quot;do&quot; /&gt;
      &lt;constant name=&quot;struts.custom.i18n.resources&quot; value=&quot;com.omb.i18n.StrutsResourceBundle&quot; /&gt;
      &lt;constant name=&quot;struts.objectFactory&quot; value=&quot;org.apache.struts2.spring.StrutsSpringObjectFactory&quot; /&gt; 
      &lt;constant name=&quot;struts.objectFactory.spring.autoWire&quot; value=&quot;name&quot; /&gt;
      &lt;constant name=&quot;struts.i18n.encoding&quot; value=&quot;ISO-8859-1&quot; /&gt;
      &lt;constant name=&quot;struts.i18n.reload&quot; value=&quot;false&quot; /&gt;
      &lt;constant name=&quot;struts.configuration.xml.reload&quot; value=&quot;false&quot; /&gt;
      &lt;constant name=&quot;struts.locale&quot; value=&quot;fr&quot; /&gt;
      &lt;constant name=&quot;struts.multipart.maxSize&quot; value=&quot;100000000000&quot; /&gt;
      &lt;constant name=&quot;struts.enable.SlashesInActionNames&quot; value=&quot;true&quot; /&gt;
      &lt;constant name=&quot;struts.mapper.alwaysSelectFullNamespace&quot; value=&quot;false&quot;/&gt;
   
      &lt;constant name=&quot;struts.codebehind.classSuffix&quot; value=&quot;Controller&quot;/&gt;
      &lt;constant name=&quot;struts.codebehind.action.checkImplementsAction&quot; value=&quot;false&quot;/&gt;
      &lt;constant name=&quot;struts.codebehind.action.checkAnnotation&quot; value=&quot;false&quot;/&gt;
      &lt;constant name=&quot;struts.codebehind.action.defaultMethodName&quot; value=&quot;index&quot;/&gt;
      &lt;constant name=&quot;struts.configuration.classpath.defaultParentPackage&quot; value=&quot;rest-default&quot; /&gt;
   
      &lt;package name=&quot;default&quot; extends=&quot;tiles-default&quot; namespace=&quot;/&quot;&gt;
   
          &lt;interceptors&gt;
   
              &lt;interceptor name=&quot;params-filter&quot;
                  class=&quot;com.opensymphony.xwork2.interceptor.ParameterFilterInterceptor&quot; /&gt;
   
              &lt;interceptor-stack name=&quot;defaultStack&quot;&gt;
                  &lt;interceptor-ref name=&quot;exception&quot; /&gt;
                  &lt;interceptor-ref name=&quot;alias&quot; /&gt;
                  &lt;interceptor-ref name=&quot;servletConfig&quot; /&gt;
                  &lt;interceptor-ref name=&quot;i18n&quot; /&gt;
                  &lt;interceptor-ref name=&quot;chain&quot; /&gt;
                  &lt;interceptor-ref name=&quot;modelDriven&quot; /&gt;
                  &lt;interceptor-ref name=&quot;fileUpload&quot;&gt;
                      &lt;param name=&quot;maximumSize&quot;&gt;11204928&lt;/param&gt;
                  &lt;/interceptor-ref&gt;
                  &lt;interceptor-ref name=&quot;staticParams&quot; /&gt;
                  &lt;interceptor-ref name=&quot;conversionError&quot; /&gt;
                  &lt;interceptor-ref name=&quot;params&quot; /&gt;
                  &lt;interceptor-ref name=&quot;prepare&quot; /&gt;
                                  &lt;interceptor-ref name=&quot;basicStack&quot;/&gt;
                  &lt;interceptor-ref name=&quot;validation&quot; /&gt;
                  &lt;interceptor-ref name=&quot;workflow&quot; /&gt;
              &lt;/interceptor-stack&gt;
   
          &lt;/interceptors&gt;
   
          &lt;default-interceptor-ref name=&quot;defaultStack&quot; /&gt;
   
          &lt;global-results&gt;
              &lt;result name=&quot;technicalError&quot; type=&quot;chain&quot;&gt;
                  errorAction
              &lt;/result&gt;
              &lt;result name=&quot;sessionInvalidError&quot; type=&quot;tiles&quot;&gt;
                  sessionInvalid
              &lt;/result&gt;
              &lt;result name=&quot;blank&quot; type=&quot;tiles&quot;&gt;blank&lt;/result&gt;
          &lt;/global-results&gt;
   
          &lt;global-exception-mappings&gt;
              &lt;exception-mapping exception=&quot;java.lang.Exception&quot;
                  result=&quot;technicalError&quot; /&gt;
              &lt;exception-mapping
                  exception=&quot;com.omb.service.exception.UserSessionInvalidException&quot;
                  result=&quot;sessionInvalidError&quot; /&gt;
   
          &lt;/global-exception-mappings&gt;
   
      &lt;/package&gt;
   
      &lt;package name=&quot;omb&quot; extends=&quot;default&quot; namespace=&quot;/omb&quot;&gt;
          &lt;action name=&quot;*Action&quot; class=&quot;myAction&quot; method=&quot;{1}&quot;&gt;
              &lt;result name=&quot;success&quot; type=&quot;redirectAction&quot;&gt;
                  &lt;param name=&quot;namespace&quot;&gt;/omb&lt;/param&gt;
                  &lt;param name=&quot;actionName&quot;&gt;displayResult&lt;/param&gt;
              &lt;/result&gt;
              &lt;result name=&quot;error&quot; type=&quot;redirectAction&quot;&gt;
                  &lt;param name=&quot;namespace&quot;&gt;/error&lt;/param&gt;
                  &lt;param name=&quot;actionName&quot;&gt;displayError&lt;/param&gt;
              &lt;/result&gt;
          &lt;/action&gt;
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  <p><strong><code>MyAction.java</code>:</strong></p>
  <pre><code>package com.omb.actions;
   
  public class MyAction extends ActionSupport implements ModelDriven&lt;MyModel&gt;{
   
      private MyModel myModel = new MyModel();
      
      public MyModel getModel() {
          return myModel;
      }
   
      public String execute() throws Exception {
          myModel.add(new Item(&quot;A&quot;, &quot;Item A&quot;));
          myModel.add(new Item(&quot;B&quot;, &quot;Item B&quot;));
          return SUCCESS;
      }
      
      public String doAction() {
          // do something
          return &quot;SUCCESS&quot;;
      }
   
      public MyModel getMyModel() {
          return this.myModel;
      }
   
      public void setMyModel(MyModel myModel) {
          this.myModel = myModel;
      }
  }
  </code></pre>
  <p><strong><code>MyModel.java</code>:</strong></p>
  <pre><code>package com.omb.modele;
  
  import java.util.ArrayList;
  import java.util.List;
  
  import com.omb.item.Item;
  
  public class MyModel {
  
      private String idItem;
  
      private List&lt;Item&gt; listeItems = new ArrayList&lt;Item&gt;();
  
      public String getIdItem() {
          return this.idItem;
      }
  
      public void setIdItem(String idItem) {
          this.idItem = idItem;
      }
  
      public List&lt;Item&gt; getListeItems() {
          return this.listeItems;
      }
  
      public void setListeItems(List&lt;Item&gt; listeItems) {
          this.listeItems = listeItems;
      }
  }
  </code></pre>
  <p><strong><code>Item.java</code>:</strong></p>
  <pre><code>package com.omb.item;
  
  import java.io.Serializable;
  
  public class Item implements Serializable {
  
      private static final long serialVersionUID = 1L;
  
      private String id;
  
      private String label;
   
      public Item() {
          super();    
      }
  
      public Item(String id, String label) {
          this.id = id;
          this.label = label;
      }
      
      public String getId() {
          return id;
      }
  
      public void setId(String id) {
          this.id = id;
      }
  
      public String getLabel() {
          return label;
      }
  
      public void setLabel(String label) {
          this.label = label;
      }
  }
  </code></pre>
  <p><strong>JSP file :</strong></p>
  <pre><code>&lt;%@ taglib prefix=&quot;s&quot; uri=&quot;/struts-tags&quot;%&gt;
  
  &lt;table width=&quot;100%&quot;&gt;
  
      &lt;tr&gt;
          &lt;td&gt;&lt;label&gt;&lt;s:property value=&quot;%{getText('label')}&quot; /&gt;&lt;/label&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;s:select id=&quot;idSelectItem&quot;
                  emptyOption=&quot;true&quot; list=&quot;listeItems&quot; value=&quot;idItem&quot;
                  listKey=&quot;id&quot; listValue=&quot;label&quot; /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  
  &lt;/table&gt;
  </code></pre>