| Advantage of using Servlet over CGI
Below are the 4 main features that make Servlet very powerful then CGI
(1)Servlet is much much better performer then CGI when we say about processing time and memory utilization. This is because servlets use benefits of multi-threading and for each of request a new thread is created which is far far better then in CGI a new object is created for each request with CGI.
(2)Servlet have another very good features that Servlet web application can be run on any standard web container like Tomcat, JBoss, Glassfish server or we have any operating system like Windows, Linux, Unix, Solaris, Mac etc.
(3)In Servlet we will not worry about memory leaks, security and garbage collection because Servlets are robust because container take care of life cycle of servlets.
(4)Servlets are maintainable and the learning curve is small because all we need to take care is business logic for our application. | | |