Apache HTTP Server 和 Apache Tomcat 的区别? [英] Difference between the Apache HTTP Server and Apache Tomcat?

查看:34
本文介绍了Apache HTTP Server 和 Apache Tomcat 的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Apache HTTP Server 和 Apache Tomcat 在功能方面有何不同?

What is the difference in terms of functionality between the Apache HTTP Server and Apache Tomcat?

我知道 Tomcat 是用 Java 编写的,而 HTTP Server 是用 C 编写的,但除此之外我真的不知道它们是如何区分的.它们有不同的功能吗?

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?

推荐答案

Apache Tomcat 用于部署 Java Servlet 和 JSP.因此,在您的 Java 项目中,您可以构建 WAR(Web ARchive 的缩写)文件,并将其放到 Tomcat 的部署目录中.

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 是一个 HTTP 服务器,为 HTTP 提供服务.Tomcat 是一个服务于 Java 技术的 Servlet 和 JSP 服务器.

So basically Apache is an HTTP Server, serving HTTP. Tomcat is a Servlet and JSP Server serving Java technologies.

Tomcat 包含 Catalina,它是一个 servlet 容器.最后,servlet 是一个 Java 类.JSP文件(类似于PHP,和较旧的ASP文件)生成Java代码(HttpServlet),然后由服务器编译成.class文件,由Java虚拟机执行.

Tomcat includes Catalina, which 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.

这篇关于Apache HTTP Server 和 Apache Tomcat 的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆