ServletResponse接口的常用方法
方法名称 功能描述
public PrintWriter getWriter() 返回PrintWrite对象,用于向客户端发送文本
public String getCharacterEncoding() 返回在响应中发送的正文所使用的文字编码
public void setCharacterEncoding() 设置发送到客户端的响应的字符编码
public void setContentType(String type) 设置发送到客户端响应的内容类型,此时响应的状态属于尚未提交