Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CGI vs Servlets

 
Raja Siva Ganesh Panuganti
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Plzz let me know the major difference between servlets and CGI
plz tell me abut their pros and cons
THANKS IN ADVANCE
 
Colin Shine
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets have far better scalability and performance, because each request is handled with a lightweight thread instead of spawning a new process.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raja Siva Ganesh Panuganti, JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "plz" instead of spelling out "please" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.

thanks,
bear
JavaRanch Sheriff
 
udit agarwal
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The diff btw cgi and the servlets.

Cgi loads every time when a request comes..but in case of sertlets the controller loads on only 1 time at the time of the first request...and then just create an new thread...so cgi is slower then servlets..but at the first time when the servlets loads is slow...there is less secuirty in cgi then servlets...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic