Hi hopefully someone may be able to help me out on this one. I have created a servlet which access a DB, stores the results in an arraylist and passes this in the session object to a jsp page. At the moment the code below iterates throught the arraylist and prints out all the records. I would like to ammend this so that there is only one record at a time displayed and the user can use a next button to get the next element displayed from the arraylist. II have seen similar posts but am still struggling. if anyone could help it would be appreciated (code so far below)as i am having problens working out how to code the next button. Hope you can help.
thankyou
<%
for (int i=0;i<arrayList.size();i++)
{
Beaninfo info = (Beaninfo)arrayList.get(i);
String whatever=info.getSubmitter();
String whatever2=info.getUrl();
String whatever3=info.getSubmitt_date();
%>
<tr>
<td><%= whatever%></td>
<td><%= whatever1%></td>
<td><%= whatever2 %></td>
</tr>
<%
}
%>
thankyou
<%
for (int i=0;i<arrayList.size();i++)
{
Beaninfo info = (Beaninfo)arrayList.get(i);
String whatever=info.getSubmitter();
String whatever2=info.getUrl();
String whatever3=info.getSubmitt_date();
%>
<tr>
<td><%= whatever%></td>
<td><%= whatever1%></td>
<td><%= whatever2 %></td>
</tr>
<%
}
%>