Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rendering Large resultset

 
A Babu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Friends,

I need your help for the scenario i am explaining here.

I have search form, from here user will search for the records by giving search options which will featch the records from the database. I am using display tag library to display them as a table in jsp. I am using this because i need pagination and exporting fetaures.

I am buillidng the collection object from the result set and put that object in session which i feed to display tag to display them.

But here the problem is, for small and medium no of records it is ok, but if the records are million i am getting out of memory or heap size error.

so I need your help to overcome this problem. Please rember i need to let the user to export the records in csv and excel and need to do pagination as it is very hard to see all the millon records in single page.

Thanks in advance.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the JSP FAQ. It details the way to tell the database to only fetch the records needed for the current page. Fetching anything else is a waste of resources and needless.
 
A Babu
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anyone help?
 
Aditya Keyal
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just in case you could not understand what Bear wanted to indicate try this link. Pagination

As for you excel/csv, retrieve all the records and write them into a file instead of adopting the above process.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic