Home Jsp The autoFlush Attribute of page Directive In JSP

Related Tutorials


 
 

Share on Google+Share on Google+

The autoFlush Attribute of page Directive In JSP

Advertisement
This section illustrates you about the autoFlush attribute of the page directive in JSP.

The autoFlush Attribute of page Directive In JSP

     

This section illustrates you about the autoFlush attribute of the page directive in JSP. This is an boolean attribute. This attribute of the page directive supports for flushing buffer automatically when the buffer is full. The value of the autoFlush attribute is either true or false. If you will specify the true value then the buffer will be flushed otherwise it will generate a raised exception if you set the false value. You cannot set the false value if the buffer size is none.

In this section, you will see about the syntaxes of the attribute of the page directive in JSP. In the following JSP code line 1: <%@page buffer="5kb" autoFlush="false" %> is specified for determining the buffer size and permit flushing buffer automatically or not. Hence, the value of the attribute autoFlush is false. So, the page will not be flushed automatically and the output is buffered with at least 8kb size of buffer if you specify the buffer size except none.

Here is the JSP code:

<%@page buffer="5kb" autoFlush="false" %>
<%
	for(int i = 0; i < 10; i++){
		out.println("<html><body><img src=images/
marijuana_leaf.jpg /></body></html>");
	}
%>

Output of the JSP program:

Download this JSP example.

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  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.

Posted on: February 6, 2008

Related Tutorials

Discuss: The autoFlush Attribute of page Directive In JSP   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com