0

I have a jsp page that has pagination links below to call page by page data from the database.. The links look like this

<< Previous 1 2 3 4 5 6 7 8 9 10 11 Next >>

< a href="getnext.jsp?min=<%=val2%>&max=<%=val1%>>  <%=i%>  </a>  (for link 1)

(where (min=0, max=10) and i = 1 ..The rownum and page index respectively )

The challenge is that this page can have up to 2400 links/pages and i do not wish to create all those links at once. A better implementation would be When the next button is click I want to dynamically create the next set of links say 12 to 20.

Any ideas on how to go about doing this? Thanks

Princesden
  • 169
  • 5
  • 14
  • I'm not really understanding what you are wanting here. Are you asking how to pass back what page it is or..? – Andrew Aug 23 '11 at 14:41

1 Answers1

0

Take a look at DisplayTag. It will set everything up for you, and is highly configurable. A particularly nice feature is that it gives you the option to let it handle slicing up your results, or for you to do it for better performance with large data sets; see the page on external paging and sorting.

atrain
  • 9,139
  • 1
  • 36
  • 40