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

what is the need for a webserver to support servlet api

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic