• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to display data page wise

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Generally in a website(or any where) we display data page wise. What is the best way to do this process ?
[ In my project every time we send a request to database whenever, we click on page but, this is not correct process. One of my friends said that we can use thirdy party tools. But we don't have such tools. Is there any way to achieve this instead of hitting database every time, bring all the data at once and store it in any object and display according to request(either using Collections or anything else) ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is one of our most asked questions.
See:
http://faq.javaranch.com/view?PaginationOrPaging
 
Praveen palukuri
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ben,
thank you for your reply. In which i found every time request is sent to database and more over we are using sqlserver2000.
But is it possible to achieve that with out hitting database every time(like bring all the data once and storing in any object). Since according to my concern hitting the database every time is time consuming process.
 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


But is it possible to achieve that with out hitting database every time(like bring all the data once and storing in any object



We implemented it in the same manner for our project.

Making just one hit to the database, the data is fetched to the client-side in chunks making use of Stateful Session Bean. We noticed that this process seems to put a lot of load on the server-side. The approach will be revamped.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But is it possible to achieve that with out hitting database every time(like bring all the data once and storing in any object).



You can always cache the results on the app server as part of a user session.
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic