tomcat6-源碼分析(2)

來源:互聯網
上載者:User
一個http請求處理流程

流程圖:

st=>start: 開始e=>end: 結束op=>operation: 伺服器首先擷取http的TCP socket串連op1=>operation: 從socket中讀取http協議內容op2=>operation: 解析http協議要求標頭op3=>operation: 擷取要求標頭中的請求的資源的路徑op4=>operation: 擷取servlet的路徑op5=>operation: 讀取靜態資源檔案並返回op6=>operation: 擷取servelt名稱op7=>operation: 載入一個新的servlet執行個體op8=>operation: 調用servlet的service方法op9=>operation: 返回異常給用戶端op10=>operation: 返回異常給用戶端op11=>operation: 擷取servlet的單例op12=>operation: 返回servlet執行個體處理結果cond=>condition: 請求資源是否是動態資源。cond1=>condition: 該servlet名稱是否存在。cond2=>condition: servlet是否是單例。st->op->op1->op2->op3->cond->op4->op6->cond1->cond2->op8->op12->econd(yes)->op4cond(no)->op5->econd1(yes)->cond2cond1(no)->op9->econd2(yes)->op11->op8cond2(no)->op7->op8

這就是一個簡化的流程

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.