• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to do database pagination using JSTL tags

 
Pooja Chetty
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to do Pagination from databse perspective. I am using Spring Framework with Jstl tags in the view.

Can any one suggest how to do that. I am using normal DAO class for JDBC connectivity so i dont want Hibernet or JSF to be used.

I need the solution as soon as possible
 
Chengwei Lee
Ranch Hand
Posts: 884
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on the database that you're doing, the method may differ. If you're using Oracle, you could go to Ask Tom and query on pagination. You would find what you need.

As for the custom tags, you could do a search at sourceforge.

 
sachin yadav
Ranch Hand
Posts: 156
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here goews the code.......



Now the database itteration where you wana apply pagination :



This logic will generate page numbers in the bottom.




I hope this will be usefull.
 
Pooja Chetty
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply sachin,

The problem is i am giving the query in the JSP. I am giving in the DAOImpl Class. In that how should i customise the code given by you.

Pooja
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic