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 if we pass negative value in load-on-startup?

1059


What are the uses of servlet and what is servlet chaining?

829


What is the difference between forward () and sendredirect () functions in servlet? Explain

784


Which protocol will be used by browser and servlet to communicate

794


What do you mean by httpservlet and how it is different from the genericservlet?

775


What do you mean by request dispatcher in servlet?

888


Explain the role of dispatcherservlet and contextloaderlistener.

918


How do you create a cookie using servlet?

868


What is http servlet? Explain with the help of an example.

833


How can we include static files in the jsp page?

821


What is the use of httpservletrequestwrapper?

825


Can filter be used as request or response?

756


What is java servlet?

829


What is the major difference between context parameter and context attribute?

869


Why is httpservlet declared abstract?

820