Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best Way to Achieve Pagination in Jsp

 
chetan raj
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can you please tell me the best way to do pagination in jsp.
I am using pager tag in the jsp. But the problem i am facing
is for every page link The query is fired to the database and it
is taking long time when the set of record are in lakhs.
I am using CachedRowset for this.
Can anybody suggest or give suitable example where i can retrieve
a set of record in one hit to database. store that in session object(cache)
and when i click my page link it should fetch the record from the object
in session and not from database.
Or is there any other way this can be best achieved.
thanks in Advance
Chetan raj
[ August 20, 2008: Message edited by: chetan raj ]
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chetan,
This is covered in our FAQ. See if it helps.
 
Shikhar Madhok
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The August edition of JavaRanch's Journal also has an article dedicated to this. You might be interested.

HTH
Shikhar
 
chetan raj
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JaiKiren Thanks for the prompt reply.
Can anybody give a link to the sample examples
on pagination will be helpful.

thanks in advance,
chetan raj
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic