I have never really used JSP, and its been a long time since I worked on MS Access. But I can surely help you out with the logic.
Rtrieve 16 rows from the table, by using something like this SELECT TOP 16 * FROM table
Loop through the record set, and print 4 <tr>s containing 4<td>s each, like this.
Code:
print "<table>";
i=0
while(!ors.EOF)
{
if(i==0)
print "<tr>";
print "<td>"+data+"</td>";
i++;
if(i==4)
{
print "</tr>";
i=0;
}
}
print "</table>";
For pagination, i.e. showing in pages, you'll have to pass the current page no. in the query string, which can the be used to retrive records and show in pages something like this.
cur_page=page_no_frm_q_string;
all the work is in the query that you make. I guess you have to set ors.PageSize and then retrive the current page.
Guess this should be informative
http://support.microsoft.com/?kbid=209126 .