Using ServletOutputStream to write very large files in a Java servlet without memory issues

后端 未结 10 1717
太阳男子
太阳男子 2020-12-01 00:28

I am using IBM Websphere Application Server v6 and Java 1.4 and am trying to write large CSV files to the ServletOutputStream for a user to download. Files are

10条回答
  •  眼角桃花
    2020-12-01 00:36

    I'm also not sure if flush() on ServletOutputStream works in this case, but ServletResponse.flushBuffer() should send the response to the client (at least per 2.3 servlet spec).

    ServletResponse.setBufferSize() sounds promising, too.

提交回复
热议问题