• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Diff Between WebContainer and WebServer

 
satya mahapatra
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
According to K&B, Apache is the WebServer and Tomcat is the container which takes care everything when a request a comes in.
But in case of SunOne Webserver which one will be container???
And if I am not wrong tomcat can be used independently as a web server.
In the above two cases will both web server and container be same???
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The term "web container" is not widely used. "Web server" and "servlet container" are more familiar.

Tomcat and SunOne can be both, while Apache is just a web server.
 
nivas ratthaaq
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think web server is subset of container. Please correct me If I'm wrong..Thanks
 
Oscar Gonzalez
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both are different things, they complement each other, but a Web Server and a Servlet container are different things, at least with the Apache HTTP Server + Tom Cat or IBM HTTP Server and Websphere Application Server, you won't want a tomcat server to serve your static content in a production enviroment. So you want to install a Web (HTTP) server for your static content and delegate the dinamic (servlet and jsp's)content to your servlet container.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you won't want a tomcat server to serve your static content in a production enviroment


While that once was sound advice (since Tomcat was slow serving content), that's not really the case any more, as it has become much faster. While there are other good reasons to use an Apache/Tomcat combination, this is no longer one of them. If that's the only reason you'd be using httpd in front of Tomcat, I'd reconsider that, because it does introduce architectural complexities.
 
Dhananjay Inamdar
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello


WebServer is either a software or physical box, which is mainly responsible for serving to the client. When client sends the request for something (this something is may be file, image etc.) then WebServer is responsible to find out that something and serve it back to client. In good-old days WebServer alone was able to handle/ serve client requests. As most of those requests were coming from some existing thing on the server like file or image.

With dynamic output or dyna-web scenario, client wanted to see dynamic web pages. This pages are not just static resources but also involves some computation, calculation. This computation is done by servlet container like Tomcat.

I hope this will make things little clear.

Thanks
 
satya mahapatra
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf, Oscar and Dhananjay for your responses. Now its quite clear what is the difference between servlet container and web server.

Thanks,
Satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic