JAVA/JSP
JSP Page 디렉티브에서 버퍼 설정(buffer속성과 autoFlush속성)
왕왕왕왕
2015. 8. 12. 15:42
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page buffer="1kb" autoFlush="true" %>
//autoFlush가 false로하면 오버플로우 예외가 발생한다.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%
for (int i = 0; i < 1000; i++) {
%>
1234
<%
}
%>
</body>
</html>
true - 버퍼가 다 찼을 경우 버퍼를 플러시하고 계속해서 작업을 진행한다.
false - 버퍼가 다 찼을 경우 예외를 발생시키고 작업을 중지한다.