• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Rendering Large resultset

 
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.
 
Marshal
Posts: 67313
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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?
 
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.
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!