Apache vs Tomcat

本质区别
1)
apache支持静态页面;
tomcat支持动态页面,比如servlet等。
2)
apache是web(http)服务器,它是专门用于提供HTTP服务,以及相关配置的(例如虚拟主机、URL转发等等)
tomcat是应用(java)服务器,它只是一个servlet(jsp)容器,可以认为是apache的扩展,但是可以独立于apache运行。
3)
apache是一辆卡车,上面可以装一些东西如html等。但是不能装水,要装水必须要有容器(桶),而这个桶也可以不放在卡车上。

使用区别
tomcat 作为 jsp,servlet 容器,虽然有静态解析功能,但性能上与 apache 相比相差很远。
apache 可以运行一年不重启,稳定性非常好,而 tomcat 则不见得。

整合
一般使用apache+tomcat的话,apache只是作为一个转发,对jsp的处理是由tomcat来处理的。

整合的好处是
如果客户端请求的是静态页面,则只需要Apache服务器响应请求,apache 解析 html 等静态网页非常快,是经过无数测试证明的。
如果客户端请求动态页面,则是Tomcat服务器响应请求。
因为jsp是服务器端解释代码的,这样整合就可以减少Tomcat的服务开销。 

其它
Tomcat是Apache组织在符合J2EE的JSP、Servlet标准下开发的一个JSP服务器


some official definitions:
What is the Apache HTTP Server?
    * is a powerful, flexible, HTTP/1.1 compliant web server
    * implements the latest protocols, including HTTP/1.1 (RFC2616)
    * is highly configurable and extensible with third-party modules
    * can be customised by writing 'modules' using the Apache module API
    * provides full source code and comes with an unrestrictive license
    * runs on Windows 2003/XP/2000/NT/9x, Netware 5.x and above, OS/2, and most versions of Unix, as well as several other operating systems

What is the Apache Tomcat?
    Apache Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process.
    Apache Tomcat is developed in an open and participatory environment and released under the Apache Software License. 

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值