• 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

displaying large number of records in a Jsp page

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a Jsp page which requires more than 30,000 records to be displayed on the screen. Of course, at a time I will be showing only a limited number of records, say about 15 or 20. But I will be fetching all the records from the database at once and storing them in the session, to reduce the round trips to the database.
How can I achieve this?
My understanding about the buffer size is that it is an attribute which is relevant only to the page scope, but not to the session. In that case, does it mean that we can store as much data as possible in the session?
Correct me if the above understanding is wrong...
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Search the JDBC forum for "ResultSet paging", there are several good discussions on it.
Basically you can support it on the database via the query, via the ResultSet by caching the ResultSet, on the Session, or a combination of the solutions.
Be careful about thinking there is a single solution to this problem, you have to evaluate a solution in he context of you problem. Typically you won't store the results on the session because the data is just too heavy. In theory you can put what you want on the session, but it has a large effect on the scalability of your application.
Also,
please check the Javaranch Naming Rules. Your display is not valid, and accounts with invalid display names get deleted. You can edit your profile to fix your display name.
thanks,
Dave
 
Sandeh Nivrutti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx David! I have gone through the three links you have given in one of the earlier topics as also the link to Servside site u have given.
Looks like this is(was?) really a hot topic...
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for changing your display name!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic