The major difference between servlet and CGI is

Options
- Servlets are thread based and CGI is process based
- Servlets executes slower compared to CGI
- Servlet has no platform specific API, where as CGI has
- All of the above


CORRECT ANSWER : Servlets are thread based and CGI is process based

Discussion Board
Servlets vs. CGI

1) Servlets are server based java application that can link directly to the Web server. CGI stands for Common Gateway Interface and can't link directly to the web server.
2)Servlets are thread based applications and work on server level. Whereas CGI creates a process base for each request.
3)Servlets share data among each other whereas CGI does not provide sharing property.
4)Servlets are good in performing session tracking and caching of previous computations as it is a server based application whereas, CGI can't perform session tracking and caching of previous computations as it has to depend on the processes.

Rohit Sharma 11-27-2014 03:19 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement