This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Diffs bw. web server and web container

 
Alex Sharkoff
Ranch Hand
Posts: 209
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I'd like to clear something in my brain (yeh, it is already too cloudy ). I'd greatly appreciate your help.

Web server - serves only static content (eg, static html page)

Web container - serves only dynamic content (eg, dynamically generated html page)

When a web server receives a request that must be serviced by a servlet it passes control to a web container. Container does its thing, gives the response back to the container, which in turn will convert it into HTTP response.

Therefore, we can always draw a line between web server and web container functionalities.

All web containers will need to have a basic web server functionality provided that they can be used on their own. So, will it be correct to say that a web container has two logical parts: one responsible for web server functionality (eg, converting response to HTTP response and then sending to the client), another for web container functionality (eg, creating HTTPServletRequest and HTTPServletResponse java objects)?


Thanks again for your answers.



P.S. I'd like to thank Cathy and Co. for the excellent book.
 
Brian Percival
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings from Hogwarts,

You got it right. I think now a days a web container also usually implicitly means a web server supported web container.

Teh book says tomcat is only a webcontainer but can also be configured to be a web server also. But usually tomcat runs as webcontainer in conjunction with apache as the web server..

basically I am merely parrotting what the book says

Brian
 
Kathy Sierra
Cowgirl and Author
Rancher
Posts: 1589
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep -- y'all are both right about this (good explanation Alex!)

The only thing I wanted to add is that there's another player that can be in the picture: a full J2EE app server.

A J2EE app *server* has:

* A web *server* (HTTP server capabilities)
* A web *Container* (like Tomcat)
* An EJB *Conatiner* (not really meaningful to have standalone EJB Containers any longer; they are virtually always part of a J2EE server these days)

(Plus a J2EE server includes other things including a JNDI implementation, something that supports JMS, etc.)

So, even though the J2EE spec includes the specs for the web Container, you can have a J2EE-compliant web Container (like Tomcat) which is *not* itself a J2EE server.

Hope that makes sense... I'm still waking up

cheers,
Kathy
 
Alex Sharkoff
Ranch Hand
Posts: 209
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot, Brian and Kathy. It is all clear now, all clouds are gone.



P.S. Kathy, I am sorry for misspelling your name in my original message.
[ October 04, 2004: Message edited by: Alex Sharkoff ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic