JSP page directive – buffer

If a programmer likes to control the use of buffered output for a JSP page then the buffer attribute can be made use of for achieving this.

Syntax of buffer attribute available for page directive is 

<%@ page buffer = “none|8kb|sizekb” %>  

In the above statement page and buffer are keywords. The size of buffer size is mentioned in kilobytes.  This is used by the out object to handle output sent from the compiled JSP page to the client web browser. The default value is 8kb. If a user specifies a buffer size then the output is buffered with at least the size mentioned by the user.

For example one can specify as:

<%@ page buffer = “none” %>

Leave a Reply

Your email address will not be published. Required fields are marked *