number « Pagination « JSP-Servlet Q&A

1. how to put page number in jsp

i need to put the page no like stackoverflow have at the tags page like 1 2 3 4 5.. next I am using jsp. Please help me ..

2. Displaying limited number of records in jsp

Ii have a txt file which contains 2000 rows of data. I want to retrive this data and dispaly in a table form, but i want show some 20-30 records per ...