• 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 ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Diff between Web & Servlet container  RSS feed

 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Please tell me what is the difference between a servlet container and a web container.
What i think is, either both means same or, web container means a container for web modules, that may be just html pages and need not be jsp/sevlets/etc. And servlet container is the one that processes the full life cycle of a servlet.
In other words, web container is sub set of servlet container.
Please tell me if i am correct or correct me other wise

Thanks
 
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Web or HTTP servers generally handle only static content - images and HTML pages and such. When they recognize dynamic content requests by extension or path or some other indicator they pass the request on to CGI, ASP, servlet, etc. So a servlet container is a "plugin" to an HTTP server. In my WebSphere project they are on separate boxes, but some other products may bind them together so neatly that you can barely see the seams.
 
Sandeep Jindal
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Stan,

Thanks for the clear explanation.

Can you please tell me some example server, where i have a web/http server(Both are same, rite??), and a pluggable servlet container. Do tomcat provide this feature?

Regards
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes. but not very efficient with static web contents like images and etc.
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Web container only for request/response and gets all static pages
Servlet Container can do dynamic things and send dynamic reposes..

For clear clarification refer 'Head First Servlets and JSP' by Kathy Sierra.


Not a member of Head First Series Marketing Team.
[ October 11, 2004: Message edited by: Afroz Ahmed ]
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The concept of Web Servers came before the Concept of Application Servers.

ie earlier there were server programs available which was able to satisfy requests for static contents
like a text/image/any kind of file. These servers have a context within which the files which can be served
by this server are kept. and this context can be reffered as WEB CONTAINER.

later when the concept of Application Servers came, they were introduced as plugin components,
since there were lots of Standalone WebServers were already there.

Later, when there were webservers which came with the built-in support of application Servers. ie
now-a-days, when you buy a AppServer, it has a WebServer built along with it.

BEA WebLogicServer,iPlanet,WebShpere.. all these servers have both web & app servers together.These
can also be configured as just web-servers and use anyother server as servlet container. If done so, since
the request has to pass to two different servers,two different JVM's, it has its own overhead.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!