• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Servlet container - what is the real definition?

 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The request is received by the Web server and handed off to the servlet con-
tainer. The servlet container can be running in the same process as the host
Web server, in a different process on the same host, or on a different host from
the Web server for which it processes requests.


The above text is from servlet specification. I can't understand the next issue: Is the servlet container and web-server the same thing? Is, for instance, Tomcat just a servlet container, or both of them? From the above definition i deduct that servlet container and web server are two different things. Why than to run a web application, we just install Tomcat, without any additional web server? Illuminate me, please!
 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A web server is something that just does one Job and that is to serve static web pages. Web server takes care of getting a request to a web page and getting the web page back to the user.
Apache is a web server.

The servlet container is the process that takes care of executing the Servlet/Jsp code and turning them into web page that the web server can deliver back to the client.
Tomcat is a web container.

The only reason that you do not have to install a separate web server when you install Tomcat is because Tomcat installs the Apache web server and the Tomcat Container. (That's why its called Apache Tomcat I assume )
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The FAQ entry on the topic.
reply
    Bookmark Topic Watch Topic
  • New Topic