博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Java Web ServletResponse
阅读量:4699 次
发布时间:2019-06-09

本文共 386 字,大约阅读时间需要 1 分钟。

ServletResponse

   方法:

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

        PrintWriter out= response.getWriter();

        out.println("  ");

    setContentType():设置响应的内容类型

        response.setContentType("application/msword");  //返回word文档

    sendRedirect(String location):请求的重定向,(此方法为HttpServletResponse中定义)

转载于:https://www.cnblogs.com/D1212/p/10311426.html

你可能感兴趣的文章
DRF的分页
查看>>
Mysql 模糊匹配(字符串str中是否包含子字符串substr)
查看>>
python:open/文件操作
查看>>
流程控制 Day06
查看>>
Linux下安装Tomcat
查看>>
windows live writer 2012 0x80070643
查看>>
tomcat 和MySQL的安装
查看>>
git常用操作
查看>>
京东SSO单点登陆实现分析
查看>>
u-boot启动第一阶段
查看>>
MySQL批量SQL插入性能优化
查看>>
定义列属性:null,default,PK,auto_increment
查看>>
用户画像展示
查看>>
C#中StreamReader读取中文出现乱码
查看>>
使用BufferedReader的时候出现的问题
查看>>
批处理文件中的路径问题
查看>>
hibernate出现No row with the given identifier exists问题
查看>>
为什么wait()和notify()属于Object类
查看>>
配置NRPE的通讯
查看>>
匹配两个空格之间的字符。。。
查看>>