Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes web server and web container Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "web server and web container" Watch "web server and web container" New topic
Author

web server and web container

harsha addala
Greenhorn

Joined: Oct 09, 2006
Posts: 3
what is the difference between web server and web container?
When a request is made from the client what is the flow in web server and container till the response is received?
Scheepers de Bruin
Ranch Hand

Joined: Jul 19, 2005
Posts: 99
The web container lives INSIDE the web server.

The web server can serve straight forward files like HTML and images that require no processing.

The web container, on the other hand handles special resources that require server processing, like .jsp

Flow:
The web server receives the request. If the request requires special processing, it hands the request to the web container that calls the relevant resource, like a servlet, to handle the request. The resource generates a response, sticks something typically HTML (might be an image) in it, and hands it to the server. The server sends it back to the requestor.


We're doomed!!<br />Yay!!!<br />No that's bad Girr!!<br />Yay!!!
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


The web container lives INSIDE the web server.

This is misleading. Apache Http Server (which is arguably the most common Web Server used) does not contain a Web Container.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
I guess we are talking about Java application servers here.

Web container = the runtime which can contain servlets, backing beans, EJB's, etc.
Web server = the execution infrastructure which handles requests and responses (mainly type of HTTP) between the web container and the client.
Scheepers de Bruin
Ranch Hand

Joined: Jul 19, 2005
Posts: 99
'k. Scratch that.

The web container possibly lives WITH the web server.
(And they have two ADORABLE puppies and garden gnomes)
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

See:
http://en.wikipedia.org/wiki/Application_server
or search this, the JSP, and the, Apache/Tomcat forums on this site.
This question gets askes several times a week here.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I just never use those words. We have IHS, a servlet container, an EJB container, a database server ...


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web server and web container