JavaEE中Web服務器、Web容器、Application服務器區別及聯繫

在JavaEE 開發Web中,咱們常常會聽到Web服務器(Web Server)、Web容器(Web Container)、應用服務器(Application Server),等容易混淆很差理解名詞。本文介紹對三者的理解,以及區別與聯繫,若是有不正確的地方還請指正。css

Web Server And Application Server

由上圖能夠看到一個標準的http處理流程:html

  1. 首先經過Web Server 接受Http請求;
  2. 好比html、css等靜態資源 Web Server 可自行處理;
  3. 當遇到動態資源(jsp等)時候Web Server 將請求轉接至Application Server中,由Application Server處理;

Web服務器(Web Server)

Web Server 或者叫 HTTP Server ,主要用於操做Http請求,包括接受客戶端的請求以及響應。它能夠處理請求,也能夠將請求轉發至其餘服務器。java

表明:NginxapacheIISweb

Web Server市場佔有率以下spring

市場佔有

應用服務器(JavaEE Application Server)

Application Server 具有了 Web Server 處理http請求的能力(但可能沒有Web Server專業)同時也支持了JavaEE 技術好比JMS、DI、JPA、Transactions、Concurrency等,同時也包含了Web Container,以下圖。apache

表明:Bea WebLogic, IBM WebSphere服務器

web sphere

應用服務器能夠選擇使用上文所說的 WebLogicWebSphere 這種重量級產品外,也可使用相似與Tomcatjetty這樣的web containner 再加上第三方的框架(spring,hibernate等)來構建本身的Application Serverapp

JavaEE Application Server市場佔有率框架

市場佔有

組合應用

一個典型的JavaEE系統能夠由兩部分構成首先是Web Server 用於處理靜態資源,而後是JavaEE Application Server 用於處理業務的動態資源。而這兩部分能夠是單獨的服務器例如Nginx+WebSphere也能夠在一個服務器上完成好比Tomcat(Tomcat便可以處理靜態資源又能夠處理動態的Servlet)。jsp

做者:帥蟲哥 出處: http://www.cnblogs.com/vipyoumay/p/5853694.html


參考連接

[1]http://stackoverflow.com/questions/12689910/difference-between-web-server-web-container-and-application-server

[2]http://stackoverflow.com/questions/5039354/difference-between-an-application-server-and-a-servlet-container?noredirect=1&lq=1

[3]https://coderanch.com/t/598746/Websphere/application-server-web-server-web

[4]http://www.ibm.com/support/knowledgecenter/zh/SSAW57_7.0.0/com.ibm.websphere.nd.iseries.doc/info/iseriesnd/ae/welc6tech_ovrex.html

相關文章
相關標籤/搜索