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???
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.
posted 13 years ago
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.
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.
posted 13 years ago
Thanks Ulf, Oscar and Dhananjay for your responses. Now its quite clear what is the difference between servlet container and web server.
Regards,<br />Satya<br />SCJP,SCWCD
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing: