This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Rendering Large resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Rendering Large resultset" Watch "Rendering Large resultset" New topic
Author

Rendering Large resultset

A Babu
Ranch Hand

Joined: Nov 28, 2005
Posts: 114
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

Joined: Jan 10, 2002
Posts: 60813
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
A Babu
Ranch Hand

Joined: Nov 28, 2005
Posts: 114
can anyone help?
Aditya Keyal
Ranch Hand

Joined: Dec 01, 2008
Posts: 71
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.


- Aditya Webservices Blog
 
Don't get me started about those stupid light bulbs.
 
subject: Rendering Large resultset
 
Similar Threads
Struts Pagination
Pagination
Pagination
Pagination using the database(DB2)
Pagination