Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Incomplete data trying to download csv on slow dial-up

Las Avasa
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP that writes out results in csv format on user request. When I issue a request from a broadband connection, the entire data comes to the browser( tried both IE and firefox and reproduced the issue ). But when I use a dial-up network and speeds very low ( e.g., < 14kbps ), part of the data gets lost. Even files about 1MB in size don't get through completely.

The data is fetched from the database and the JSP code looks like this...We are using Weblogic 8.1 as app server/web server. But the problem was reproducible using WLS 9.2 Cluster with Apache Proxy

ByteArrayOutputStream ostr = new ByteArrayOutputStream();

PrintWriter printW = new PrintWriter(ostr,true);

lformat.formatCSV((printW)); // lformat is our application object that iterates over a list of java objects and does a bunch of println() statements to the PrintWriter.



Prior to this we were passing 'out' directly to the formatting object but that had its own issues when users with slow n/w tried the action.

I am wondering if there is a better way to do what I am trying to do.

Please help.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!