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

Explain the servlet filter.

546


What is java servlet?

616


What is meant by cookies?

618


What is the procedure for initializing a servlet?

551


What’s the use of the servlet wrapper classes??

648






What is a servlet context object?

630


When servlet object is created?

610


Which protocol will be used by browser and servlet to communicate

586


What is servlet interface?

713


What are sessions in servlets?

587


Why are servlets used?

538


How do you run a servlet?

550


What is the difference between using getSession(true) and getSession(false) methods?

578


Which java framework is most popular?

586


What are different Authentication options available in Servlets.

573