title: Pagination through Struts2 using DisplayTag Library Framework
body: <p>I want to apply pagination for some class of my application, in which i am using spring, struts2 &amp; hibernate. Here i am calling action class from welcome.jsp file. It has following code :</p>
  
  <pre><code>&lt;s:form action="marketing/allCountry.action"&gt;  
           &lt;s:submit value="Click"&gt;&lt;/s:submit&gt;  
           &lt;/s:form&gt;  
  </code></pre>
  
  <p>Now my <code>allCountry.action</code> class of java has following code :</p>
  
  <pre><code>public String executeAction() throws Exception {
          try {
              countryList = new ArrayList&lt;Country&gt;();
              countryList = this.countrySecurityProcessor.findByAll(0, null, null, null, null, false, false, null, null, null, null, 0);
              System.out.println("countryList = "+countryList);
              return ActionSupport.SUCCESS;
  
          } catch (Exception ex) {
              return ActionSupport.ERROR;
          }
  }
  </code></pre>
  
  <p>It fetches the data properly, that i confirmed by printing countryList object. But now i am redirecting from <code>SUCCESS</code> to <code>country.jsp</code>. The code of <code>country.jsp</code> is :</p>
  
  <pre><code>&lt;display:table list="countryList" requestURI="CountryAllAction" pagesize="3"&gt;
      &lt;display:column property="id" title="ID" /&gt;
      &lt;display:column property="name" /&gt;
  &lt;/display:table&gt;
  </code></pre>
  
  <p>Now at the time executing my application i am getting run time error like :</p>
  
  <blockquote>
    <p>javax.servlet.ServletException: javax.servlet.ServletException:
    Exception: [.LookupUtil] Error looking up property "id" in object type
    "java.lang.String". Cause: Unknown property 'id'</p>
  </blockquote>
  
  <p>What is the solution to this type of error?</p>