• Post Reply Bookmark Topic Watch Topic
  • New Topic

Large pdf document

 
kumar thokkala
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the best way to stream large pdf document generated on fly (about 500 pages) to client from a servlet.

I am using Bufferedoutpustream and I did set the content type, (although I didn't set up up the length as I don't know the size of document) ....

Please suggest me how to solve this timeout problems and outof memroy issues on server.

Thanks,
Kumar
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kumar kuamr:
Please suggest me how to solve this timeout problems and outof memroy issues on server.


What timeout and out of memory problems? Are you seeing actual problems or just anticipating them?

You shouldn't need to add a BufferedStream, the Servlet OutputStream is already buffered.
 
kumar thokkala
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I generate around 200 page document everything works fine but when the number of page generation increased to 500, on server I get OutOfMemoryError and user's browser keeps clocking.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is probably just a case of giving the server more memory ie change the config settings.
 
Srivatsa Katta
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Is this statement true
You shouldn't need to add a BufferedStream, the Servlet OutputStream is already buffered.


I am asking coz.. if its already buffered, then why does apache implemets org.apache.commons.messagelet.impl.BufferedServletOutputStream again ??

-Tripter
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!