Question:
What are the advantages using servlets than using CGI?
Answer:
Servlets provide a way to generate dynamic documents that is both easier to write and faster to run. It is efficient, convenient, powerful, portable, secure and inexpensive.
Servlets also address the problem of doing server-side programming with platform-specific APIs. They are developed with Java Servlet API, a standard Java extension. Source: CoolInterview.com
servelet creates threads for each request and in case of CGI it creates an 0bject for each request comparingly slower than servelet Source: CoolInterview.com
Answered by: udhayarani | Date: 7/5/2009
| Contact udhayarani
cgi must be loaded into the server every time when it is invoked .After the work has been completed it will be removed from the server. but servlet remains in the server even after the work is completed with that servet.
cgi uses native code but servlet don't uses that native code.so servlet is purely plat form independent Source: CoolInterview.com
Answered by: thiru | Date: 8/2/2009
| Contact thiru
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|