<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="java.util.*,java.io.*"%> <% out.println("<h1>response内置对象</h1>"); out.println("<hr>"); out.flush();//清空缓冲区 //获得输出流对象 PrintWriter outer=response.getWriter(); outer.println("我是歌谣"); //重定向 %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" import="java.util.*,java.io.*"%> <% out.println("<h1>response内置对象</h1>"); out.println("<hr>"); //out.flush();//清空缓冲区 //获得输出流对象 PrintWriter outer=response.getWriter(); outer.println("我是歌谣"); //重定向 response.sendRedirect("test08.jsp"); %>