• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

What Are the Differences Between HTTP Server and Servlet Container

 
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What are the differences between a HTTP Server and a Servlet Container? Tomcat is a Servlet container. Apache is a web server. What is a HTTP Server?
 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HttpServer is meant for receiving the user request and identifying the resource to be processed and sending the response to the client.
Whereas servlet container would be responsible for compiling the servlet using the javac and then executing the class file. The output of the servlet excution would be routed to the HttpServer which would send it as a response to the client.
Hope this helps.
 
Ranch Hand
Posts: 582
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Is HTTP Server part of Web server?

thanks
daniel
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Web Server" is not a hugely helpful name. Web pages are served using HTTP, so a Web Server is analagous to an Http Server. Its less confusing if you call "Apache" (often refered to as a web server) by its full name: Apache Http Server.
[ January 25, 2005: Message edited by: Paul Sturrock ]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that Tomcat's "default" servlet acts as a plain HTTP server which is why a typical Tomcat installation serves plain web pages and resources such as image files as well as directing selected requests to servlets and servlets created from JSP. Unfortunately there is room for confusion because the Apache Software Foundation is the home of both the Apache web server and the Tomcat servlet engine/web server.
Bill
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Below is the answer I got from another forum. Please comment:


HTTP is the Hypertext Transport Protocol. Both Apache and Tomcat will accept HTTP requests.

The difference is that Apache is JUST an HTTP server. It serves up static HTML pages.

Tomcat has an HTTP listener inside it, but in addition to that it has a servlet/JSP engine. It can serve up both static and dynamic HTML pages.

You can use Tomcat without Apache.

Apache cannot handle servlet/JSP requests without having a servlet/JSP engine bolted on top of it.

 
Paul Sturrock
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's accurate.
[ January 26, 2005: Message edited by: Paul Sturrock ]
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tomcat is the official reference implementation of the Java Servlet and JavaServer Pages technologies. Developed under the Apache license in an open and participatory environment.
Apache has set of projects in which HTTP (web) Server and jakarta are two names of the projects. jakarta deals with java-related efforts.
Under jakarta, we have Tomcat,Struts,Ant,Log4J and other ....

Tomcat's purpose is to provide standards-compliant support for servlets and JSP pages. The purpose of servlets and JSP pages is to generate web content such as HTML files or GIF files on demand using changing data. Web content that is generated on demand is said to be dynamic. On the other hand, web content that never changes and is served up as-is is called static.

While Tomcat is capable of serving both dynamic and static content, it is not as fast or feature-rich as the Apache web server with regard to static content. While it would be possible for Tomcat to be extended to support the same features that Apache does for serving up static content, it would take a great deal of time;

Apache has been under development for many years. Also, because Apache is
written entirely in C and takes advantage of platform-specific features, it is unlikely that Tomcat, a 100% Java application, could ever perform well as Apache.

The earliest versions of Tomcat included a connector that enabled Tomcat and Apache to work together. In this arrangement, Apache receives all of the HTTP requests made to the web application. Apache then recognizes which requests are intended for servlets/JSP pages, and passes these requests to Tomcat.Tomcat fulfils the request and passes the response back to Apache, which then returns the response to the requestor.

However, as mentioned above, Apache will most likely always have superior performance and options when it comes to serving up static content
and communicating with clients via HTTP, and, for this reason, anyone who is using Tomcat for hightraffic web applications may want to consider using Apache and Tomcat together.
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic