Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Container

 
Dinesh Tahiliani
Ranch Hand
Posts: 486
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone please expalin me the difference between web server and container of servlet . Please i am getting onfused very much ..
Alos, i have heard that container is the thing in which servlet can view its environment variables, wht this means ???
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34371
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dinesh,
A web server serves static content like HTML, CSS, JavaScript and image files. These are files that are the same each time they are requested. A web container within an application server can serve static content or dynamic content. Dynamic content files can and likely do change each time such as servlets and JSPs.
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly the subject line "Container" makes little sense, you need to make it more descriptive.

As Jeanne said, a web server is meant to serve static content, it just accepts request for a valid resource and serves it, if security constraints are met.
A container is something that "contains" or holds. Like a servlet container contains servlets and a EJB container contains EJBs. It provides an execution environment for the dynamic content it holds.

Lastly I dont think this question really belongs to the servlets forum.
 
sameer khazi
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Mr.Ghorpade. Thanks for the explanatory note. Actually we just move ahead without actually understand what certain words means as what you have said about the Web Server and Container.

Though we believe to be very much understood the meaning of so and so term but really i must appreciate that JavaRanch makes things so easy to learn.

Thank you All
 
aleem khan
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Are you guys sure about the concepts which you have told? Tomcat is a webserver but Jboss is Web application server...tomcat can generate dynamic content so it means webserver too can generate dynamic content? am i right??
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to understand that there are any number of definitions for these terms around. Unless we all agree exactly which definitions we use we have only commonly used terms, about which there may be disagreement what they mean.

What is generally agreed upon is that Tomcat is a web server and a servlet container. In the sense that it can serve Java web applications it is also an application server. JBoss, on the other hand, can also server JEE applications, which makes it a different kind of application server.

The term that seems to cause the most confusion is "web container", which is why I encourage people not to use it.

This page may also help clear up the confusion: WebVsApplicationServer
[ September 21, 2008: Message edited by: Ulf Dittmer ]
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat is a webserver but Jboss is Web application server...tomcat can generate dynamic content so it means webserver too can generate dynamic content?

Tomcat in itself is not a web server, its a container. When you say Apache Tomcat, then its a web server with a servlet and JSP container.
Whereas Jboss is a full fledged J2EE application server since it can cater EJBs also.
And as Ulf said, you need to read that FAQ entry to make things a bit clear.
But as the FAQ says, the distinction will always remain blurry.

Hope this helps
[ September 21, 2008: Message edited by: Amit Ghorpade ]
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mr.Ghorpade. Thanks for the explanatory note

You are welcome
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic