This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 ???
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.
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??
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 ]
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 ]