jsp保存问题

来源:百度知道 编辑:UC知道 时间:2024/06/23 09:26:40
response.setHeader("Content-Type","application/file");
response.addHeader("Content-Disposition", "filename=xxxxx.doc");
这两句啥意思?如何用?最好举个简单例子.

response.setHeader 是用来设置返回页面的头 meta 信息,
使用时 response.setHeader( name, contect );

meta是用来在HTML文档中模拟HTTP协议的响应头报文。meta 标签用于网页的<head>与</head>中

1、<meta name="Generator" contect="">用以说明生成工具(如Microsoft FrontPage 4.0)等;

2、<meta name="KEYWords" contect="">向搜索引擎说明你的网页的关键词;

3、<meta name="DEscription" contect="">告诉搜索引擎你的站点的主要内容;

4、<meta name="Author" contect="你的姓名">告诉搜索引擎你的站点的制作的作者;

5、<meta name="Robots" contect= "all|none|index|noindex|follow|nofollow">

其中的属性说明如下:

设定为all:文件将被检索,且页面上的链接可以被查询;

设定为none:文件将不被检索,且页面上的链接不可以被查询;

设定为index:文件将被检索;

设定为follow:页面上的链接可以被查询;

设定为noindex:文件将不被检索,但页面上的链接可以被查询;

设定为nofollow:文件将不被检索,页面上的链接可以被查询。

http-equiv属性

1、<meta http-equiv="Content-Type" c