刚学就不用看这些先看body里面的东西
解决方案 »
- struts2
- 实现节点管理 Struts2 Spring Hibernate 实现树级菜单带添加节点与删除功能
- 如何跳出过程,不继续执行
- MD weblogic,大家帮我看看这个部署问题,在网上能查到的招都用上了,还是不行
- 怎样做到点击复选框能提交到服务器上
- 一个jsp开发用JSTL和EL取值的问题
- 关于Maven两个问题,Ant可以解决,但manven不知道如何处理
- 在linux下jdbc驱动程序找不到??在线等待.....
- JSP的ResultSet绝对定位问题
- 求助,mysql insert语句出错
- 高分求助在线等...连接池的问题
- 求救,java中 cas sso(单点登录),如何实现用户注册
The AddHeader method adds an HTML header with a specified value. This method always adds a new HTTP header to the response. It will not replace an existing header of the same name. Once a header has been added, it cannot be removed.If another Response method will provide the functionality you require, it is recommended that you use that method instead.SyntaxResponse.AddHeader name, value
Parameters name
The name of the new header variable.
value
The initial value stored in the new header variable.
ResTo avoid name ambiguity, name should not contain any underscore (_) characters. The ServerVariables collection interprets underscores as dashes in the header name. For example, the following script causes the server to search for a header named MY-HEADER.<% Request.ServerVariables("HTTP_MY_HEADER") %>Because the HTTP protocol requires that all headers be sent before content, in general you must modify all outgoing headers before your ASP script generates any output. In IIS 4.0, this meant that you had to call AddHeader in your script before any output (such as that generated by HTML code or the Write method) was sent to the client.However, with IIS versions 5.0 and later, response buffering (enabled by the metabase property AspBufferingOn) is on by default. Therefore, you can call the AddHeader method at any point in the script, as long as it precedes any calls to Flush.The following .asp file illustrates this point.<HTML>
Here's some text on your Web page.
<% Response.AddHeader "WARNING", "Error Message Text" %> Here's some more interesting and illuminating text.
<% Response.Flush %>
<% Response.Write("some string") %>
</HTML>
In the preceding example, because the page is buffered by default, the server will not send output to the client until all the scripts on the ASP page have been processed or until the Flush method is called. With buffered output, calls to AddHeader can appear anywhere the script, so long as they precede any calls to Flush. If the call to AddHeader appeared below the call to Flush in the preceding example, the script would generate a run-time error.You can use this method to send multiple copies of the same header with different values, as with WWW-Authenticate headers.ExampleThe following example uses the AddHeader method to request that the client use Basic authentication.<% Response.Addheader "WWW-Authenticate", "BASIC" %>
Note The preceding script merely informs the client browser which authentication to use. If you use this script in your Web applications, you should ensure that the Web server has Basic authentication enabled.