What is difference between cgi and servlet in interview point?
Remo Solo
for more details You check this link https://sites.google.com/site/sureshdevang/cgi-vs-servlet
SERVLET Servlets can link directly to the Web server. Servlets can share data among each other. Servlets can perform session tracking and caching of previous computations. Servlets are portable. In Servlets, the Java Virtual Machine stays up, and each request is handled by a lightweight Java thread. Servlets automatically parse and decode the HTML form data. Servlets can read and set HTTP headers, handle cookies, tracking sessions. Servlets is inexpensive than CGI. CGI: CGI cannot directly link to Web server. CGI does not provide sharing property. CGI cannot perform session tracking and caching of previous computations. CGI is not portable. In CGI, each request is handled by a heavyweight operating system process. CGI cannot automatically parse and decode the HTML form data. CGI cannot read and set HTTP headers, handle cookies, tracking sessions. CGI is more expensive than Servlets