what is the advantage of using Servlets over CGI programming?

Answer Posted / janet

Servlets are only instantiated when the client first
accesses the program. All subsequent accesses are done to
that instance.This keeps the response time of servlets lower
than that of CGI programs, which must be run once per
hit.also because servlet is instantiated only once,all
accesses are put through that one object. This helps in
maintaining objects like internal connection,pooling or user
session tracking and lots of other features.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is generic servlet class?

815


What is servlet instance?

766


Can we refresh servlet in client and server side automatically?

799


Explain in brief the directory structure of a web application?

800


Which event is fired at the time of session creation and destroy?

1122


Which protocol will be used by browser and servlet to communicate

776


What is the use of httpservletresponsewrapper?

720


What is the purpose of requestdispatcher interface?

828


What is a servlet engine?

756


How we can get ip address of client in servlet?

744


Which is the methods of generated servlet?

896


Why servlet is faster than jsp?

773


how many jsp scripting elements are there and what are those?

798


What is the use of request dispatcher interface?

784


What is the importance of init() method in Servlet ?

819