Google News
logo
Java Servlets - Interview Questions
What are the advantages of Servlet over CGI?
Servlet technology was introduced to overcome the shortcomings of CGI technology.
 
* Servlets provide better performance than CGI in terms of processing time, memory utilization because servlets use benefits of multithreading and for each request, a new thread is created, that is faster than loading creating new Object for each request with CGI.

* Servlets and platform and system independent, the web application developed with Servlet can be run on any standard web container such as Tomcat, JBoss, Glassfish servers and on operating systems such as Windows, Linux, Unix, Solaris, Mac, etc.

* Servlets are robust because container takes care of the life cycle of servlet and we don’t need to worry about memory leaks, security, garbage collection, etc.

* Servlets are maintainable and the learning curve is small because all we need to take care is business logic for our application.
Advertisement