This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
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 HTTPServletResponsejava objects)?
Thanks again for your answers.
P.S. I'd like to thank Cathy and Co. for the excellent book.
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
Joined: Apr 11, 2004
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 ]