response.setContentType()的参数及对应类型

<%@ page errorPage=”error.jsp” contentType=”text/html;charset=gbk”%>
<html>
<title>这个是setContentType 的测试</title>
<body>
<h2>response对象</h2>
这个是WORD来打开的内容<Br>
<%
response.setContentType(“text/plian;charset=gbk”);%>
这个是WORD来打开的内容
</body>
</html>

image/bmp             BMP
image/gif             GIF
image/jpeg             JPEG
image/tiff             TIFF
image/x-dcx             DCX
image/x-pcx             PCX
text/html             HTML
text/plain             TXT
text/xml             XML
application/afp             AFP
application/pdf             PDF
application/rtf             RTF
application/msword             MSWORD
application/vnd.ms-excel             MSEXCEL
application/vnd.ms-powerpoint             MSPOWERPOINT
application/wordperfect5.1             WORDPERFECT
application/vnd.lotus-wordpro             WORDPRO
application/vnd.visio             VISIO
application/vnd.framemaker             FRAMEMAKER
application/vnd.lotus-1-2-3             LOTUS123
application/octet-stream     信息流

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>