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

CGI and Servlets

 
Ranch Hand
Posts: 68
  • 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 CGI and Servlets?
What are the advantages of Servlets over CGI?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think CGI used to be the name of the standard that governed how form parameters would be transferred within a web server to a further processing step (e.g. a Perl script). In that sense, servlets are an implementation of CGI as well.
If you are actually referring to the invocation of Perl (or whatever) scripts in response to a web request, that entails the startup of a Perl interpreter process for each request, so there'a quite a bit of overhead. More modern variants (called Fast-CGI) somehow keep that process running, and thus have lower overhead.
 
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CGI - Common Gateway Interface


The Common Gateway Interface, or CGI, is a standard for external gateway programs to interface with information servers such as HTTP servers.



http://hoohoo.ncsa.uiuc.edu/cgi/intro.html

One of advantages of servlets is using Java language, which could be more powerful and flexible than Perl, PHP or C. Imagine that you want to write enterprise application with Perl. You will have many problems with accessing database, using transactions, using XML, using messaging etc. In Java(J2EE) you have everything ready to use.
 
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic