title: JQuery Datatable pagination with only the results for per page
body: <p>The followings is the code for paginated datatable in my JSP:</p>
  
  <pre><code>$(document).ready( function() {
      $('#paginatedTable').dataTable( {
          "bServerSide" :true,
          "sAjaxSource" :"/JQueryPagination/Myservlet",
          "bProcessing" :false,
          "sPaginationType" :"full_numbers",
          "bJQueryUI" :false,
          "aoColumns" : [ {
              "mDataProp" :"Name"
          }, {
              "mDataProp" :"Address"
          }, {
              "mDataProp" :"Town"
          } ]
      });
  });
  </code></pre>
  
  <p>In my servlet, I have a query that fetches the entire data from a database table, say company which returns me a million rows in the result set.</p>
  
  <pre><code>List&lt;Company&gt; companies =  fetchCompleteCompanyDataFromDb(); 
  </code></pre>
  
  <p>This result set is then filtered as below:</p>
  
  <pre><code>List&lt;Company&gt;filteredCompanyList = companies.subList(iDisplayStart,DisplayStart+iDisplayLength);
  </code></pre>
  
  <p>The <code>filteredCompanyList</code> is the list I'm displaying in the datatable, which is 10 rows.
  When the user clicks the 'Next' button of the pagination, a new request is fired with will fetch the complete company data again and then the next 10 records for the second page is filtered. In short, whenever the user clicks the next button, a query for fetch a million record is fired.</p>
  
  <p>I need to know whether is there a way where when the user clicks the next button, only the next <strong>10 records</strong> to show will be fetched. </p>