The difference between Servlet and CGI

Compared with traditional CGI and many other similar techniques CGI, Java Servlet more efficient, easier to use, more powerful, more portable, more economical investment.

Servlet in the server process, which runs its service () method by multiple threads, an instance can service multiple requests, and the examples are generally not destroyed, CGI has produced a new process for each request, after the completion of service destroyed, so the efficiency is lower than the Servlet

CGI not portable, written for a specific platform CGI application can run in this environment, and each request must start a new process

Guess you like

Origin www.cnblogs.com/xp0813/p/11032973.html