HI Most of the time I read Tomcat is Web-server.. Sometimes I read Tomcat is web-container.. Sometimes I r开发者_开发问答ead Apache is web-server.. I am bit puzzled.. Can anybody explain it properly?
Thanks..
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 - 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.
精彩评论