This week's book giveaway is in the Artificial Intelligence forum.
We're giving away four copies of Pragmatic AI and have Noah Gift on-line!
See this thread for details.
Win a copy of Pragmatic AI this week in the Artificial Intelligence forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Diffs bw. web server and web container  RSS feed

Ranch Hand
Posts: 209
  • 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.
Ranch Hand
Posts: 163
  • 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

Cowgirl and Author
Posts: 1589
  • 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

Alex Sharkoff
Ranch Hand
Posts: 209
  • 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 ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!