What is the difference in terms of functionality between the Apache HTTP Server and Apache Tomcat?
Apache HTTP Server和Apache Tomcat之间的功能有何不同?
I know that Tomcat is written in Java and the HTTP Server is in C, but other than that I do not really know how they are distinguished. Do they have different functionality?
我知道Tomcat是用Java编写的,而HTTP Server是用C语言编写的,但除此之外我还不知道它们是如何区分的。他们有不同的功能吗?
8 个解决方案
#1
411
Apache Tomcat is used to deploy your Java Servlets and JSPs. So in your Java project you can build your WAR (short for Web ARchive) file, and just drop it in the deploy directory in Tomcat.
Apache Tomcat用于部署Java Servlet和JSP。因此,在Java项目中,您可以构建WAR(Web ARchive的简称)文件,并将其放在Tomcat的deploy目录中。
So basically Apache is an HTTP Server, serving HTTP. Tomcat is a Servlet and JSP Server serving Java technologies.
所以基本上Apache是HTTP服务器,提供HTTP服务。 Tomcat是一个服务于Java技术的Servlet和JSP服务器。
Tomcat is a servlet container. A servlet, at the end, is a Java class. JSP files (which are similar to PHP, and older ASP files) are generated into Java code (HttpServlet), which is then compiled to .class files by the server and executed by the Java virtual machine.
Tomcat是一个servlet容器。最后,一个servlet是一个Java类。 JSP文件(类似于PHP和旧的ASP文件)生成为Java代码(HttpServlet),然后由服务器将其编译为.class文件并由Java虚拟机执行。
#2
99
In addition to the fine answers above, I think it should be said that Tomcat has it's own HTTP server built into it, and is fully functional at serving static content too. Depending on your java virtual machine configuration it can actually outperform going through traditional connectors in apache such as mod_proxy and mod_jk.
除了上面的精细答案之外,我认为应该说Tomcat内置了自己的HTTP服务器,并且在提供静态内容方面也非常实用。根据您的Java虚拟机配置,它实际上可以超越传统的apache连接器,如mod_proxy和mod_jk。
That said a fully optimized Tomcat server should serve static files fast and if you have Java servlets, JSPs and ColdFusion files in addition to static content you may find tomcat does an excellent job by itself.
这就是说完全优化的Tomcat服务器应该快速提供静态文件,如果你有静态内容的Java servlet,JSP和ColdFusion文件,你可能会发现tomcat本身就是一个很好的工作。
#3
67
- Apache is a general-purpose http server, which supports a number of advanced options that Tomcat doesn't.
- Although Tomcat can be used as a general purpose http server, you can also set up Apache and Tomcat to work together with Apache serving static content and forwarding the requests for dynamic content to Tomcat.
Apache是一个通用的http服务器,它支持Tomcat没有的许多高级选项。
虽然Tomcat可以用作通用http服务器,但您也可以将Apache和Tomcat设置为与Apache服务静态内容一起使用,并将动态内容请求转发给Tomcat。
#4
23
Tomcat is primarily an application server, which serves requests to custom-built Java servlets or JSP files on your server. It is usually used in conjunction with the Apache HTTP server (at least in my experience). Use it to manually process incoming requests.
Tomcat主要是一个应用程序服务器,它服务于服务器上定制的Java servlet或JSP文件的请求。它通常与Apache HTTP服务器一起使用(至少根据我的经验)。用它来手动处理传入的请求。
The HTTP server, by itself, is best for serving up static content... html files, images, etc.
HTTP服务器本身最适合提供静态内容... html文件,图像等。
#5
17
an apache server is an http server which can serve any simple http requests, where tomcat server is actually a servlet container which can serve java servlet requests.
apache服务器是一个http服务器,可以提供任何简单的http请求,其中tomcat服务器实际上是一个可以为java servlet请求提供服务的servlet容器。
Web server [apache] process web client (web browsers) requests and forwards it to servlet container [tomcat] and container process the requests and sends response which gets forwarded by web server to the web client [browser].
Web服务器[apache]处理Web客户端(Web浏览器)请求并将其转发到servlet容器[tomcat],容器处理请求并发送由Web服务器转发到Web客户端[浏览器]的响应。
Also you can check this link for more clarification:-
您也可以查看此链接以获得更多说明: -
https://sites.google.com/site/sureshdevang/servlet-architecture
Also check this answer for further researching :-
另请查看此答案以进行进一步研究: -
#6
12
If you are using java technology(Servlet/JSP) for making web application you will probably use Apache Tomcat. However, if you are using other technologies like Perl, PHP or ruby, its better(easier) to use Apache HTTP Server.
如果您使用Java技术(Servlet / JSP)来制作Web应用程序,您可能会使用Apache Tomcat。但是,如果您使用其他技术(如Perl,PHP或ruby),则更好(更容易)使用Apache HTTP Server。
#7
3
Well, Apache is HTTP webserver, where as Tomcat is also webserver for Servlets and JSP. Moreover Apache is preferred over Apache Tomcat in real time
好吧,Apache是HTTP Web服务器,其中Tomcat也是Servlet和JSP的Web服务器。此外,Apache实时优于Apache Tomcat
#8
-1
Apache is an HTTP web server it serve as HTTP but apache tomcat is an java servlet container,IT FEATURES Same as web server customized to execute java servlet and JSP pages.
Apache是一个HTTP Web服务器,它用作HTTP,但apache tomcat是一个java servlet容器,IT功能与定制用于执行java servlet和JSP页面的Web服务器相同。
#1
411
Apache Tomcat is used to deploy your Java Servlets and JSPs. So in your Java project you can build your WAR (short for Web ARchive) file, and just drop it in the deploy directory in Tomcat.
Apache Tomcat用于部署Java Servlet和JSP。因此,在Java项目中,您可以构建WAR(Web ARchive的简称)文件,并将其放在Tomcat的deploy目录中。
So basically Apache is an HTTP Server, serving HTTP. Tomcat is a Servlet and JSP Server serving Java technologies.
所以基本上Apache是HTTP服务器,提供HTTP服务。 Tomcat是一个服务于Java技术的Servlet和JSP服务器。
Tomcat is a servlet container. A servlet, at the end, is a Java class. JSP files (which are similar to PHP, and older ASP files) are generated into Java code (HttpServlet), which is then compiled to .class files by the server and executed by the Java virtual machine.
Tomcat是一个servlet容器。最后,一个servlet是一个Java类。 JSP文件(类似于PHP和旧的ASP文件)生成为Java代码(HttpServlet),然后由服务器将其编译为.class文件并由Java虚拟机执行。
#2
99
In addition to the fine answers above, I think it should be said that Tomcat has it's own HTTP server built into it, and is fully functional at serving static content too. Depending on your java virtual machine configuration it can actually outperform going through traditional connectors in apache such as mod_proxy and mod_jk.
除了上面的精细答案之外,我认为应该说Tomcat内置了自己的HTTP服务器,并且在提供静态内容方面也非常实用。根据您的Java虚拟机配置,它实际上可以超越传统的apache连接器,如mod_proxy和mod_jk。
That said a fully optimized Tomcat server should serve static files fast and if you have Java servlets, JSPs and ColdFusion files in addition to static content you may find tomcat does an excellent job by itself.
这就是说完全优化的Tomcat服务器应该快速提供静态文件,如果你有静态内容的Java servlet,JSP和ColdFusion文件,你可能会发现tomcat本身就是一个很好的工作。
#3
67
- Apache is a general-purpose http server, which supports a number of advanced options that Tomcat doesn't.
- Although Tomcat can be used as a general purpose http server, you can also set up Apache and Tomcat to work together with Apache serving static content and forwarding the requests for dynamic content to Tomcat.
Apache是一个通用的http服务器,它支持Tomcat没有的许多高级选项。
虽然Tomcat可以用作通用http服务器,但您也可以将Apache和Tomcat设置为与Apache服务静态内容一起使用,并将动态内容请求转发给Tomcat。
#4
23
Tomcat is primarily an application server, which serves requests to custom-built Java servlets or JSP files on your server. It is usually used in conjunction with the Apache HTTP server (at least in my experience). Use it to manually process incoming requests.
Tomcat主要是一个应用程序服务器,它服务于服务器上定制的Java servlet或JSP文件的请求。它通常与Apache HTTP服务器一起使用(至少根据我的经验)。用它来手动处理传入的请求。
The HTTP server, by itself, is best for serving up static content... html files, images, etc.
HTTP服务器本身最适合提供静态内容... html文件,图像等。
#5
17
an apache server is an http server which can serve any simple http requests, where tomcat server is actually a servlet container which can serve java servlet requests.
apache服务器是一个http服务器,可以提供任何简单的http请求,其中tomcat服务器实际上是一个可以为java servlet请求提供服务的servlet容器。
Web server [apache] process web client (web browsers) requests and forwards it to servlet container [tomcat] and container process the requests and sends response which gets forwarded by web server to the web client [browser].
Web服务器[apache]处理Web客户端(Web浏览器)请求并将其转发到servlet容器[tomcat],容器处理请求并发送由Web服务器转发到Web客户端[浏览器]的响应。
Also you can check this link for more clarification:-
您也可以查看此链接以获得更多说明: -
https://sites.google.com/site/sureshdevang/servlet-architecture
Also check this answer for further researching :-
另请查看此答案以进行进一步研究: -
#6
12
If you are using java technology(Servlet/JSP) for making web application you will probably use Apache Tomcat. However, if you are using other technologies like Perl, PHP or ruby, its better(easier) to use Apache HTTP Server.
如果您使用Java技术(Servlet / JSP)来制作Web应用程序,您可能会使用Apache Tomcat。但是,如果您使用其他技术(如Perl,PHP或ruby),则更好(更容易)使用Apache HTTP Server。
#7
3
Well, Apache is HTTP webserver, where as Tomcat is also webserver for Servlets and JSP. Moreover Apache is preferred over Apache Tomcat in real time
好吧,Apache是HTTP Web服务器,其中Tomcat也是Servlet和JSP的Web服务器。此外,Apache实时优于Apache Tomcat
#8
-1
Apache is an HTTP web server it serve as HTTP but apache tomcat is an java servlet container,IT FEATURES Same as web server customized to execute java servlet and JSP pages.
Apache是一个HTTP Web服务器,它用作HTTP,但apache tomcat是一个java servlet容器,IT功能与定制用于执行java servlet和JSP页面的Web服务器相同。