Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

displaying large number of records in a Jsp page  RSS feed

 
Sandeh Nivrutti
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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...
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • Quote
  • Report post to moderator
Thank you for changing your display name!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!