码迷,mamicode.com
首页 > 其他好文 > 详细

out内置对象

时间:2016-07-15 23:38:05      阅读:289      评论:0      收藏:0      [点我收藏+]

标签:

<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"
%>
<%@ page import="java.text.*" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>

</head>
<body>
<%
out.println("<h2>啦啦1</h2>");
out.println("窗前明月光<br>");
out.println("窗前明月光<br>");
out.println("窗前明月光<br>");

%>
缓冲区大小:<%=out.getBufferSize() %>字节<br>
缓冲区剩余大小:<%=out.getRemaining() %>字节<br>
是否自动清空缓冲区:<%=out.isAutoFlush() %><br>


</body>
</html>

 

技术分享

 

 

<body>
<%
out.println("<h2>啦啦1</h2>");
out.println("窗前明月光<br>");
out.flush();
//out.clear();//这里会抛出异常,下面代码不会继续执行

//out.clearBuffer();//不会抛异常,继续执行
out.println("窗前明月光<br>");
out.println("窗前明月光<br>");

%>
缓冲区大小:<%=out.getBufferSize() %>字节<br>
缓冲区剩余大小:<%=out.getRemaining() %>字节<br>
是否自动清空缓冲区:<%=out.isAutoFlush() %><br>

</body>

 

 

out内置对象

标签:

原文地址:http://www.cnblogs.com/huiziz/p/5674645.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!