what is the advantage of using Servlets over CGI programming?
Answer Posted / mdsha_asiya
The problem with CGI script is that your server must
restart the CGI script every time a new request is
issued.This means every time a client communicates,your
server needs to begin a new proccess .starting and stopping
processes are expensive operions.
The difference between servlet and CGI scritpt is that CGI
script must be restarted every request where as servlets
are pooled and reused over and over again to service many
requests.This means you don't have to restart a process
every time client request comes over the network.
After servlet is loaded,to handle client request it simply
creates a thread and runs service() of servlet.
servlets are more efficient,powerful,portable,inexpensive
and convinent.
Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
What do you mean by deployment descriptor?
What is cgi?
how many jsp scripting elements are there and what are those?
What is a web application and what is it’s directory structure?
What is the use of httpservletrequestwrapper and httpservletresponsewrapper?
What are the steps that are involved in using the httpservlet class?
How can we refresh automatically when new data has entered the database?
Whether we can get deadlock situation in servlets?
What is context in servlet?
How the servlet is loaded?
Why session tracking is needed?
What is servlet instance?
What is a servlet context object?
Can we override servlet service method?
What is the difference between portlet and servlet?