Tomcat学习笔记(一)
生活随笔
收集整理的這篇文章主要介紹了
Tomcat学习笔记(一)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
HTTP 請求
一個HTTP請求包括三個組成部分:
? 方法—統一資源標識符(URI)—協議/版本
? 請求的頭部
? 主體內容
下面是一個HTTP請求的例子:
POST /examples/default.jsp HTTP/1.1
Accept: text/plain; text/html
Accept-Language: en-gb
Connection: Keep-Alive
Host: localhost
User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
Content-Length: 33
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
一個HTTP請求包括三個組成部分:
? 方法—統一資源標識符(URI)—協議/版本
? 請求的頭部
? 主體內容
下面是一個HTTP請求的例子:
POST /examples/default.jsp HTTP/1.1
Accept: text/plain; text/html
Accept-Language: en-gb
Connection: Keep-Alive
Host: localhost
User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)
Content-Length: 33
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
lastName=Franks&firstName=Michael
HTTP 響應
類似于HTTP請求,一個HTTP響應也包括三個組成部分:
? 方法—統一資源標識符(URI)—協議/版本
? 響應的頭部
? 主體內容
下面是一個HTTP響應的例子:
HTTP/1.1 200 OK
Server: Microsoft-IIS/4.0
Date: Mon, 5 Jan 2004 13:13:33 GMT
Content-Type: text/html
Last-Modified: Mon, 5 Jan 2004 13:13:12 GMT
Content-Length: 112
<html>
<head>
<title>HTTP Response Example</title>
</head>
<body>
Welcome to Brainy Software
</body>
</html>
總結
以上是生活随笔為你收集整理的Tomcat学习笔记(一)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Strut2中单元测试实例
- 下一篇: android德州扑克计算器,学界 |