ServletResponse接口

ServletReponse:封装了响应信息,如果想给用户什么响应,具体可以使用该接口的方法实现。

getWriter():返回PrintWriter对象。调用该对象的print()方法,将把print()中的参数直接打印到客户的浏览器上。

设置响应的内容类型:reponse.setContentType("application/msword");

原文地址:https://www.cnblogs.com/bd195746/p/10283447.html