Introduction :
1. By using this buffer attribute we can set the buffer size or we can disable buffer future.
2. The default size of buffer is 8KB
Syntax: <%@ page buffer= "integer/none” %>
Case 1 :setting buffer size
The buffer attribute of page directive may also be used to change the buffer size. The example below sets the buffer size to 4 KBytes.
Ex: <%@ page buffer="4kb" %>
In this case all the servlet output write into the buffer before writing to the response object.
Case 2: disable buffer future
You may code a buffer value of "none" to specify no buffering so that all servlet output is immediately write into the response object .
<%@ page buffer="none" %>
11. autoFlush
1. The autoflush attribute of page directive is used to indicate JSP containers behavior when the buffer gets full.
2. autoflush attribute takes boolean values true or false as input. The default value for autoflush is true.
Syntax: <%@ page autoFlush="true/false" %>
Case 1 : autoFlush = “false”
If autoflush is set to false, if the buffer gets full, JSP container will raise an exception.
<%@ page autoFlush="/false" %>
Case 2: autoFlush = “true”
1. the default value of the jsp page autoFlush attribute is “true” .
2. If autoflush is set to true, if the buffer gets full, JSP container will flush the data into response object.
12. info
1. this attribute provide the information regarding current jsp page.
2. The JSP container ignores the info attribute.
3. The info attribute is meant for JSP programmers to help them understand about the functionality of the page.
Syntax: <%@page info="content"%>
Example:
<%@page info="this document is provided by myjavahub team" %>
13. pageEncoding
This attribute specifies the language that the page uses when the page is sent to the browser. This attribute works like the meta tag of the HTML markup language.
Example : <%@ page pageEncoding="GBK" %>
No comments:
Post a Comment