I have a database with over 1000 entries. I would like to know how can I break up the entries so I can display a 100 per page as supposed to displaying the whole record set one page? So if a user gets pulls up the database the first page will display 1-100 and if an icon or link is clicked it will go to 101-200 etc. How can I do this using jsp?
A JSP isn't exactly the best place to do this type of processing. You should consider filtering down your dataset long before it gets sent to the page. Depending upon which DB you are using, there may be facilities that make it easy to do this closer to the back end. For example PostgreSQL has LIMIT and OFFSET clauses that you can place on a query that make paging through large datasets almost trivial. If your database lacks such capabilites you can: (a) switch to one that does, (b) pare down the data sent to the JSP in a controller servlet, (c) pare down the data in a bean that abstracts the query, (d) something else that I haven't thought of yet. (In order of my own preference). Handling this type of complex logic directly on a JSP is the last thing you want to do. hth, bear