title: Can't figure it out how to <s:select>
body: <p>Trying to get list of companies in <code>select</code> but it gives me an error. </p>
  
  <pre><code>type Exception report
  
  message tag 'select', field 'list', name 'workOrder.company': The requested list key          
  'listAllCompanys' could not be resolved as a collection/array/map/enumeration/iterator
     type.   Example: people or people.{name} - [unknown location]
  
  description
     The server encountered an internal error that prevented it from fulfilling this request.
  </code></pre>
  
  <p><strong>Exception:</strong></p>
  
  <pre><code>org.apache.jasper.JasperException: tag 'select', field 'list', name 'workOrder.company': The requested list key 'listAllCompanys' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location]
  org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
  org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
  </code></pre>
  
  <p>my <code>workOrder.jsp</code> file containing :</p>
  
  <pre><code>&lt;s:select list="listAllCompanys"  listValue="companyName" name="workOrder.company"&gt;&lt;/s:select&gt;
  </code></pre>
  
  <p>When I have a new work order to add, there should be a list of companies available in select . </p>
  
  <p>UPDATE: </p>
  
  <p>Here's my <code>listAllCompanies()</code> method</p>
  
  <pre><code>public List&lt;Company&gt; getCompanyList() {
      return companyList;
  }
  
  //////////////////////////////////////////
  /////////////////////////////////////////
  
  public List&lt;Company&gt; getListAllCompanys() {
      return listAllCompanys;
  }
  
  private List&lt;Company&gt; listAllCompanys;
  
  public String listAllCompanys() throws Exception
  {
      CompanyDaoHibernate dao = new CompanyDaoHibernate();
      listAllCompanys = dao.getListOfCompanys();
  
      return SUCCESS;
  
  }
  </code></pre>
  
  <p><code>CompanyDAOHibernate</code>:</p>
  
  <pre><code>public List&lt;Company&gt; getListOfCompanys()
  {
  
      SessionFactory sf = HibernateUtil.getSessionFactory();
      Session session =  sf.openSession();
  
       @SuppressWarnings("unchecked")
      List&lt;Company&gt;  returnList =  (List&lt;Company&gt;)session.createCriteria(Company.class).list();
      session.close();
      System.out.println("Printing companies... "+returnList);
      return returnList;
  
  }
  </code></pre>