Please send your Questions & Answers or Feedback to "mohan@javabook.org"

What are the advantages of Servlet over CGI?


Servlets have several advantages over CGI:
A Servlet does not run in a separate process. This removes the overhead of creating a new process for each request.
A Servlet stays in memory between requests. A CGI program (and probably also an extensive runtime system or interpreter) needs to be loaded and started for each CGI request.
There is only a single instance which answers all requests concurrently. This saves memory and allows a Servlet to easily manage persistent data.
Several web.xml conveniences
A handful of removed restrictions
Some edge case clarifications

Related Posts Plugin for WordPress, Blogger...
Flag Counter