Servlet-3 Async Context, how to do asynchronous writes?

后端 未结 6 1910
忘掉有多难
忘掉有多难 2020-12-07 08:44

Problem Description

Servlet-3.0 API allows to detach a request/response context and answer to it later.

However if I try to write a big amount of data, som

6条回答
  •  再見小時候
    2020-12-07 09:16

    During my research on this topic, this thread kept popping up, so figured I mention it here:

    Servlet 3.1 introduced async operations on ServletInputStream and ServletOutputStream. See ServletOutputStream.setWriteListener.

    An example can be found at http://docs.oracle.com/javaee/7/tutorial/servlets013.htm

提交回复
热议问题