Home Jsp The autoFlush Attribute of page Directive In JSP



The autoFlush Attribute of page Directive In JSP
Posted on: February 6, 2008 at 12:00 AM
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.

Related Tags for The autoFlush Attribute of page Directive In JSP:
cexceptioniosizesedbooleanpagebufferportvalueattributeolethisaisetsupportooifbooforcallflushtoautomaticicalboolciportsshgenerateautoeilitdirectivenotlscanwiseulraisepeceinnocalmtrcaleanspectruedirfullfalseautomaticallyallagenoneppratewhensrectsuspdirectatisirllivomaeaexceptannrtrtswisvaufttzssrithatiautoflushalufeeitherflushingicaicaonomolonon


More Tutorials from this section

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

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.