13 - request request request HTML 4.2 response response...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
{ 1 上节知识要点 { request 对象中处理汉字信息 。 { request 对象常用方法举例。 { request 对象的用户注册实例。 { HTML 表单和表格的概念和实例。 4.2 response 对象 { 使用 response 对象对客户的请求做出动 态响应。向客户端发送数据。 4.2.1 动态响应 contentType 属性 { 由于 page 指令只能为 contentType 属性 指定一个值来决定响应的 MIME 类型,如 果想动态的改变这个属性的值来响应客户, 就要使用 response 对象的 setContentType String s )方法来改 contentType 的属性值。
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
{ 2 { 该方法动态设置响应的 MIME 类型,一般 MIME 类型可以取 text/html;text/plain;application/x- msex-cel;application/msword . { 当使用改变后的 MIME 类型返回页面给客 户时,要保证客户端支持该 MIME 类型。 可以查看本地支持的文件类型。 4.10 4.11
Background image of page 2
{ 3 4.2.2 response HTTP 文件头 { HTTP 请求和 HTTP 响应。 { 典型的 HTTP 请求 : post/tree3.jsp/HTTP/1.1 host:localhost:8080 accept_encoding:gzip,deflate { Reponse 使用方法:
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/25/2011 for the course CS NetworkPro taught by Professor Xiaohuawang during the Summer '09 term at Tsinghua University.

Page1 / 5

13 - request request request HTML 4.2 response response...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online