title: How to divide table to show in pages? The table data is filled dynamically with jsp
body: <p>I have a table created using <code>HTML</code> and <code>JSP</code>. The values of the table are created dynamically using the JSP. My code is similar to what is shown below: </p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href="css/table.css"&gt;
  &lt;HTML&gt;
  &lt;BODY&gt;
  &lt;div class="MyTable" &gt;
  &lt;table border="0"&gt;
  &lt;thead&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;b&gt;User&lt;/b&gt;&lt;/td&gt;
      &lt;td&gt;&lt;b&gt;Data&lt;/b&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;%
  
  -----------------------
  --- JAVA CODE ---------
  -----------------------
  if( condition )  //if condition satisfied, then a row of data is added
  {
  %&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;%= GENERATED_FROM_CODE %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= GENERATED_FROM_CODE %&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;%
  }
  -----------------------
  --- JAVA CODE ---------
  -----------------------
  %&gt;
  &lt;/BODY&gt;
  &lt;HTML&gt;
  </code></pre>
  
  <p>Sometimes the data is large and the table becomes very long. I want to create a page where only a certain number, say <strong>10 rows</strong> will be shown at a time. There should be a link below showing <strong>next</strong> / <strong>previous</strong>, <strong>first</strong> / <strong>last</strong>, <strong>page</strong> <strong>number</strong> etc., that will let you browse through the contents of the table. </p>
  
  <p>Please give me some ideas on what to use to achieve this. Kindly tell me if you need some more information regarding my requirement.</p>