步步为营-74-Request,Response和server的其他成员
Request
1 Request.UrlReferrer 获取请求的来源
2 Request.UserHostAddress 获取访问者的IP地址
3 Request.Cookies 获取浏览器发送过来的浏览器端cookie值
4 Request.MapPath() 将虚拟路径转化为磁盘的物理路径
Response
1 Response.Buffer 缓冲区,将相应信息放置到一个缓冲区内,一起返给用户
2 Response.Flush() 将缓冲区的数据发送到客户端
3 Response.Clear() 清空缓冲区
4 Response.ContentEncoding 输出流的编码
5 Response.ContentType 输出流的内容类型 ☆
6 Response.Cookie 返回浏览器 ☆
7 Response.OUtputStream 输出流
8 Response.End() 终止响应☆
9 Response.Redirect(url) 重定向☆
10 Response.Write() 输出☆
11 Response.SetCookie() 输出☆
Server
1 Server.MapPath() 获取文件物理路径
2 Server.Execute() 方法 和Server.Transfer() 方法 执行另一个页面的脚本 区别:Transfer在服务器内部直接执行跳转
3 Server.HtmlEncode() 将HTML编码,原样输出 <>进行编码 防止跨站脚本攻击
4 Server.HtmlDecode()
5 Server.UrlEncode()
6 Server.UrlDecode()
步步为营-74-Request,Response和server的其他成员的更多相关文章
- Request 、Response 与Server的使用
纯属记录总结,以下图片都是来自 ASP.NET笔记之 Request .Response 与Server的使用 Request Response Server 关于Server.MapPath 方法看 ...
- HttpContext对象下的属性Application、Cache、Request、Response、Server、Session、User
概述: HttpContext封装关于单个HTTP请求的所有HTTP特定信息. HttpContext基于HttpApplication的处理管道,由于HttpContext对象贯穿整个处理过程,所以 ...
- Server,Servlet,ServletConfig,ServletContext,Session,Request,Response
Server流程 解析URL->找到应用->找到Servlet->实例化Servlet->调用init->调用service->返回响应->调用destroy ...
- track message forwards, avoiding request loops, and identifying the protocol capabilities of all senders along the request/response chain
https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html The TRACE method is used to invoke a remote, ...
- ZeroMQ之Request/Response (Java)
自己最开始是在cloud foundry中接触过消息服务器(nats),或者说是消息中间件,也算是初步知道了一个消息服务器对于分布式的网络系统的重要性,后来自己也曾想过在一些项目中使用它,尤其是在一些 ...
- day06 Request Response
rw 读写模板的设置 day05 Request Response 1. HttpServletResponse 简介 1.1 Response 的 OutputStream 输出中文的问题 1.2 ...
- HTTP Request & Response
Request & Response header details can be found here The request method indicates the method to b ...
- servlet dispatcher .forward(request, response); 进入其它servlet【原】
dispatcher .forward(request, response); 进入其它servlet 假如我们的web.xml配置如下 <servlet> <servlet-nam ...
- response.sendRedirect(url)与request.getRequestDispatcher(url).forward(request,response)的区别
response.sendRedirect(url)跳转到指定的URL地址,产生一个新的request,所以要传递参数只有在url后加参数,如: url?id=1.request.getRequest ...
随机推荐
- openstack Q版部署-----虚拟机密码修改问题
一.修改镜像密码 1.打开一个要修改的镜像 随便找一台centos服务器 [root@linux-node1 ~]#wget http://cloud.centos.org/centos/7/imag ...
- sonar排除实体类配置
sonar覆盖率检查可以将一些实体类排除,maven项目可以在pom.xml文件中添加如下配置 <properties> <sonar.exclusions> src/main ...
- CF1099F Cookies
题目地址:CF1099F Cookies 树形dp套树形数据结构 对每个节点 \(i\) ,分两步进行: 1.令 \(f_i\) 为Mitya在节点 \(i\) 停止游戏最多可以吃到多少块饼干 我们可 ...
- 视觉SLAM之词袋(bag of words) 模型与K-means聚类算法浅析
原文地址:http://www.cnblogs.com/zjiaxing/p/5548265.html 在目前实际的视觉SLAM中,闭环检测多采用DBOW2模型https://github.com/d ...
- gcc/g++基本命令
gcc & g++现在是gnu中最主要和最流行的c & c++编译器 .g++是c++的命令,以.cpp为主,对于c语言后缀名一般为.c.这时候命令换做gcc即可.其实是无关紧要的.其 ...
- python中__init__ ,__del__ &__new__
__new__ __new__方法是用来创建对象,__new__方法需要有一个返回值,这个返回值表示创建出来的对象的引用 __init__ __init__方法在类的一个对象被建立时 ,马上执行.__ ...
- HNU 2015暑期新队员训练赛2 B Combination
先转化出求 Cnr中有多少奇数 其实就是 (n 的二进制数中 1 的个数为 k ,则这个奇数为 2 ^ k) 因为数很大, 故要快速求出区间的奇数 然后求 0 – low-1 的奇数, 0- high ...
- Vuex与axios介绍
Vuex集中式状态管理里架构 axios (Ajax) Vuex集中式状态管理架构 -简单介绍: vuex是一个专门为Vue.js设计的集中式状态管理架构. 我们把它理解为在data中需要共享给其他组 ...
- java泛型类型变量能调用的方法
public class Person { } public class Student extends Person{ private String name; public Student(Str ...
- [HTTP] 基本认证的工作流程
HTTP的基本认证涉及两个字段,一个是请求字段 Authorization: Authorization: Basic xxx 一个是响应字段 WWW-Authenticate WWW-Authent ...