tags:

views:

330

answers:

1

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?

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.

Thanks! :-)

+8  A: 

A Servlet Container is a Web Server that must be able to run Java Servlets.

Web Server, on the other hand, is a broader term including all software running and communicating through HTTP protocol.

Under these definitions:

  1. All Servlet Containers are Web Servers
  2. Not all Web Servers are Servlet Containers. I.E. Apache HTTP Server can not run Java Servlet directly.
Pablo Santa Cruz
Thanks for being so precise :)
Prasoon Saurav