Usage difference between Apache and Apache Tomcat

As Tomcat is a widely used java web server, and Apache is also a web server, what's the different between them in real project usage?

After some research, I got a simple idea like,

Apache Tomcat <=> For java fans

Apache <=> More general web server, eg. PHP:XAMPP,LAMP


The differences between Apache and Apache Tomcat are:

Apache:

  • It is developed in C.
  • It is an HTTP server. That means that it serves files through HTTP protocol.
  • It can host applications coded in any programming languages, not just Java.
  • It is capable of request/response processing and load balancing.
  • It can generally handle requests for static html pages. However, it can still handle dynamic requests for pages coded in languages like PHP, Perl and Ruby.
  • Apache Tomcat:

  • It is developed in Java.
  • It is a JSP/Servlet container. That means it handles the lifecycle for servlets.
  • It is supposed to host applications those are coded in Java. However, it can also execute Perl scripts.
  • Beyond the basic request/response processing, it can also manage the entire JSP/Servlet lifecycle.
  • It can handle both static and dynamic content. The static page are generated using HTML, while the dynamic content are generated using Servlet and JSP.

  • Apache is more for a static web site with basic functions. Apache tomcat is container above Apache which can used with Java backend project.

    They can be used separately or run together.


    Apache - It's a web server, which helps in serving static content mostly. But, it can also handle dynamic requests for pages coded in languages like PHP, Perl and Ruby.

    Tomcat - It's an application server, which helps in deploying dynamic content using Java.

    Apache Tomcat - Here, both are used in conjunction where Apache serves static content, and forwarding the requests for dynamic content to Tomcat.

    Content refers to web pages.

    链接地址: http://www.djcxy.com/p/96450.html

    上一篇: 我如何通过HTTP代理从Git存储库中获取?

    下一篇: Apache与Apache Tomcat的使用区别