Jcat
宠辱不惊,闲看庭前花开花落~~
posts - 173,comments - 67,trackbacks - 0
本质区别
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.
posted on 2007-03-06 21:00 Jcat 阅读(803) 评论(0)  编辑  收藏 所属分类: Java

只有注册用户登录后才能发表评论。


网站导航: