• 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

Difference between servlets and webs erver

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would like to know difference between servlets(servletrunner) and web server ?
Can servlet programs replace a web server ? If so what are activities that offered by web server cannot be implemented through servlets?
I think without using webserver it is possible to invoke a servlet (when servletrunner is running by using port 8080) ?
So what is the difference between a servlet and web server ?
thanx in advance.
Sankar S
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As I understand it, a servlet functions as this:
html <---> web server <---> application server (running servlets)
an HTTP message is sent to a web server, and the web server interprets the message and when appropriate turns over control to a servlet. For a servlet, you need a system that can execute the program being called, be it Perl, Java, or whatever.
So the short answer is that you must have a web server. In some cases, however, the web server and application server may be the same machine. Why would they be separate machines? What if your servlet crashes the system? It's better to keep the web server alive and your site up.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic