APACHE-TOMCAT 任何人都可以详细说明哪一个是 Web 服务器和 Web 容器吗?
你好 大多数时候我读到 Tomcat 是 Web-server.. 有时我读到 Tomcat 是 web-container.. 有时我读到 Apache 是网络服务器..我有点困惑.. 有人能正确解释一下吗?
谢谢..
HI
Most of the time I read Tomcat is Web-server.. Sometimes I read Tomcat is web-container..
Sometimes I read Apache is web-server.. I am bit puzzled..
Can anybody explain it properly?
Thanks..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我使用 Tomcat 已有好几年了,但我相信我可以回答你的问题。 Tomcat 是一个 JSP Servlet 容器。它还有一个内置的网络服务器。所以我认为你的问题的答案是Tomcat既是服务器又是容器。 Tomcat 可能(我从未这样做过,但我记得读过相关内容)可以在 Apache 下运行,并允许 Apache 处理所有静态 HTML 页面等。 Apache 是一个 Web 服务器,因此在大容量静态页面加载方面比 Tomcat(用于动态页面)要好得多。
It's been several years since I've worked with Tomcat, but I believe I can answer your question. Tomcat is a JSP Servlet Container. It also has a built-in web server. So I think the answer to your question is that Tomcat is both server and container. It may (and I have never done this, but I think I recall reading about it) be possible for Tomcat to run under Apache, and allow Apache to handle all the static HTML pages and such. Apache is a web server, and thus much better at high-volume static page loads and such than Tomcat, which is intended for dynamic pages.
Apache HTTP Server - 或 HTTPD(D 代表守护进程) - 是第一HTTP服务器,通常称为“Apache”。事实上,几乎没有人使用全名,即使这是一种滥用。因此,“Apache”的意思是 Web 服务器(最初是“补丁服务器”)。
Apache Tomcat 是一个 Servlet/JSP 容器,它用于使用 Servlet API 提供动态生成的内容。 Apache Tomcat 还可以充当 Web 服务器并提供静态文件(如图像、CSS),但这不是它的主要功能(Web 服务器 Apache 在这方面做得更好1)。它通常被称为“Tomcat”。
1 Apache(Web 服务器)可以用作 Apache Tomcat 的前端。当一起使用时,Apache 将对动态内容(Servlet/JSP)的请求转发到 Tomcat,但提供静态内容。
Apache HTTP Server - or HTTPD (D for deamon) - is the number one HTTP server and it is commonly referred to as "Apache". Actually, almost nobody uses the full name even if this is a kind of abuse . So, "Apache" means the web server ("a patchy server" originally).
Apache Tomcat is a Servlet/JSP container, it is used to serve dynamically generated content using the Servlet API. Apache Tomcat can also act as a web server and serve static files (like images, css) but this is not its primary function (and Apache, the web Server, does a better job at this1). It is often referred to as "Tomcat".
1 Apache (the web server) can be used as a frontend to Apache Tomcat. When used together, Apache forwards the requests for dynamic content (Servlets/JSPs) to Tomcat but serves the static content.