[7.d] AutoFlush attribute in JSP page directive

AutoFlush attribute in JSP page directive

This attribute is used to control the behaviour of the buffer. Buffer will be flushed automatically when full if autoFlush is true otherwise throw an exception.
Syntax: <%@ page autoFlush=”value”%>

Example:

welcome.jsp
<%@ page autoFlush="true" %> 
 
<html>
 <head>
  <title>autoFlush page directive example</title>
 </head>
 <body> 
  <h3>Hello this is a autoFlush page directive example.</h3>
 </body>
</html>
web.xml
<web-app>
 
  <welcome-file-list>
          <welcome-file>welcome.jsp</welcome-file>
  </welcome-file-list> 
 
</web-app>

Output: