Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

what is the need for a webserver to support servlet api

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai all,

sai here!

I just need to know what is the need for a webserver to support servletApi?

And also please tell how the server handles multiple requests?

cheers,
sai.
 
Marshal
Posts: 67415
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by arr gem:

I just need to know what is the need for a webserver to support servletApi?



I'm probably misunderstanding your question, but without servlet support a web server cannot process servlets. It's like a car without an engine.


And also please tell how the server handles multiple requests?



In multiple threads.
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The fetching of static resources is still done by web server.so all containers have a simple web server within it.Even a J2EE server has servelt container within it and the container in turn will have a web server.
 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rahul,

the container in turn will have a web server.


Would you please throw more light on this.
Does Tomcat( a container or web container rather) has web server in it?

Thaks and regards,
Saurabh Kumar
 
Bear Bibeault
Marshal
Posts: 67415
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ashu Kumar S",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Web server is nothing special.It is just a program which is listening at a port for incoming requests and serves appropriately.Any servelt container will have a web server within it.Might not be a distinct server , might be just a minimal one for serving static pages.

But in production a web container is also recomended to take help of a full blown web server.That is why many tomcats at production is connected with Apache web server using mod JK.In this case the request for the static contenet are taken care by the Apache Web server and the servet requests are served by tomcat.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Rahul Bhattacharjee:

But in production a web container is also recomended to take help of a full blown web server.That is why many tomcats at production is connected with Apache web server using mod JK.In this case the request for the static contenet are taken care by the Apache Web server and the servet requests are served by tomcat.



This used to be the case.
These days it is becoming more common to deploy on Tocmat as a standalone server. Both the JVM and Tomcat itself have improved (performance wise) enough that the overhead of connecting to webserver is often more expensive than using the webserver capabilities of Tomcat, by itself.

There may be other reasons to connect to a webserver, such as the need for ASP, PHP, or Perl support, but for performance, Tomcat does just fine on it's own.
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic