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
Is it good idea to create servlet constructor?
How servlet is created?
How many servlet objects are created?
Difference between httpservlet and generic servlets?
Which are the different ways you can communicate between servlets?
What is the advantage of Servlets when compared with other server side technologies?
What do you mean by url pattern in servlet?
Explain session tracking and its importance?
Is servlet a server side scripting language?
When to use doget() and when dopost()?
How do you create a cookie using servlet?
Explain the working of service() method of a servlet.
Explain the difference between servletconfig and servletcontext in servlet?
How the JSP file will be executed on the Server side?
What are the disadvantages of storing session state in cookies?