Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Servlet downloading very large file causing Outofmemory exception

843842Jun 16 2010 — edited Jun 18 2010
Hi,

i am trying to download a file using http servlet output stream, by reading the records from the database and download the records as a file. I am writing the records to the stream using the method write(byte[]) and flushing it regularly. But i still get Outof memory exception. When i debugged the code found that count on the output stream keep on growing even after calling flush() method.

Is there any way i can download very large files. Is it just any setting in server configuration or does it require java code change. Please let me know its urgent for me.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 16 2010
Added on Jun 16 2010
2 comments
628 views