<%@ page language="java" import="java.util.*,java.io.*" contentType="text/html; charset=utf-8"%>
<%
response.setCharacterEncoding("text/html;charset=utf-8");
out.println("<h1>response内置对象</h1>");
out.println("<hr>");
PrintWriter pw=response.getWriter();
pw.println("大家好,我时PW的对象PW");
%>
把 response.setCharacterEncoding("text/html;charset=utf-8");改成response.setContentType("text/html;character=utf-8");
把 response.setCharacterEncoding("text/html;charset=utf-8");改成 request.setCharacterEncoding("utf-8");就行了。