Share on Google+Share on Google+

Page Directive attribute - autoFlush

Advertisement
This section contains description of autoFlush attribute of page Directive.

Page Directive attribute - autoFlush

This section contains description of autoFlush attribute of page Directive.

autoFlush Attribute :

The autoFlush Attribute: This attribute is used to control the nature of the servlet output buffer. Its work to show that the buffered output is flushed or not. If buffer value is none then autoFlush can not be true.

This directive causes the servlet to flush the output buffer when full:

<%@ page autoFlush="false" %>
<%@ page autoFlush="true" %>

Usually, the buffer and autoFlush attributes are coded on a single page directive as follows:

<%@ page buffer="16kb" autoflush="true" %>

Example :

<%@page buffer="15kb" autoFlush="false"%>

<%
for (int i = 0; i <2; i++) {
out.println("<html><body><img src='images/DollEm.jpg'/></body></html>");
}
%>

Output:

Advertisements

Posted on: November 27, 2012 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.