Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

what is the need for a webserver to support servlet api  RSS feed

 
mara thamizhan
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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.
 
Rahul Bhattacharjee
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.
 
Saurabh Kumar
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
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!