Home Jsp The buffer Attribute of page Directive In JSP

Related Tutorials


 
 

Share on Google+Share on Google+

The buffer Attribute of page Directive In JSP

Advertisement
This section just introduces about the buffer attribute of the page directive in JSP.

The buffer Attribute of page Directive In JSP

     

This section just introduces about the buffer attribute of the page directive in JSP. This attribute sets the buffer size in kilobytes i.e. used by the out object to handle output generated by the JSP page on the client web browser. If you specify the buffer size then the output will be buffered with at least 8kb because the default and minimum value of the buffer attribute is 8kb.

In this section you will learn the buffer attribute syntaxes and usage of it in your JSP page for your JSP application. In the following JSP page, page cannot be flushed automatically because the value of the autoFlush is set with false. You cannot set the value of autoFlush is false when buffer size if you specify "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 above 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 buffer 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