JSP server output buffer (transparent)

zhaozj2021-02-16  43

By default: The server is output to the client's content, not directly written to the client, but first writes to an output buffer. Only in the case of the following three, the content of the buffer is output to On the client:

The output buffer of the JSP page has completed information is full of JSP to call out.Flush () or response.flushbuffer () output buffer size can be used: <% @ page buffer = "none" | "nkb"% > Or response.setbuffersize () settings, as follows:

Set the size of the output buffer to 1KB. <% @ page buffer = "1kb"%> or response.setBuffersize (1); setting the size of the output buffer is 0, that is, it is not buffered. <% @ page buffer = "none"%> or response.setBuffersize (0);

With response.getBuffersize () or out.getBuffersize (), the size of the output buffer, unit is byte. Use response.iscommitted () to check if the data has been output to the client. If the return value is TRUE The data has been output to the client, and it is not yet.

转载请注明原文地址:https://www.9cbs.com/read-20442.html

New Post(0)