问题描述
"Web服务器"和"Servlet容器"之间有什么区别?
总的来说,所有Web服务器都是Servlet(Web)容器吗?反之亦然?
What is the difference between "A Web Server" and "A Servlet Container"?
In general are all Web Servers Servlet(Web) Containers too or vice versa?
我一直在使用Apache Tomcat for JSP和Apache for PHP,但无法弄清楚两者之间的确切区别,到底在哪里?
I have been using Apache Tomcat for JSP and Apache for PHP but unable to figure out the exact difference between those two, where exactly lies the difference?
我尝试搜索以前的线程,但找不到很多.
I tried searching previous threads but could not find much.
谢谢! :-)
推荐答案
一个Servlet容器是一个必须能够运行Java Servlet的Web服务器.
A Servlet Container is a Web Server that must be able to run Java Servlets.
Web服务器是一个广义的术语,包括所有通过HTTP协议运行和通信的软件.
Web Server, on the other hand, is a broader term including all software running and communicating through HTTP protocol.
在以下定义下:
- 所有Servlet容器都是 Web服务器
- 并非所有的Web服务器都是 Servlet容器. IE. Apache HTTP Server无法直接运行Java Servlet.
- All Servlet Containers are Web Servers
- Not all Web Servers are Servlet Containers. I.E. Apache HTTP Server can not run Java Servlet directly.
这篇关于Web服务器和servlet容器之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!