what is the advantage of using Servlets over CGI programming?
Answer Posted / sandeep m
CGI programs need separate process to process a request.
For which CGI object has to be created and destroyed for
each request or else pool of processes can be maintained by
server and for each request a process is assigned by server
which will be returned back to server after request
processing.
Servlets use Threads. Due to which single Servlet object is
created. Whenever a request is received by server a new
thread is created and the thread uses the existing Servlet
instance.
Advantage is process creation is heavy weight. Threads are
light weight. Burden of creating and destroying processes
is reduced or else maintaining process objects in pool is
reduced. Any number of requests can be served with not much
burden on server
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
What do you mean by servlet context?
What is the difference between genericservlet and httpservlet
How servlet is created?
Explain the war file?
What is difference between server and servlet?
Why is servlet used?
What is the servletconfig object?
What is servletconfig?
Difference between forward() method and sendredirect() method ?
Explain the difference between get and post method in servlet?
What are the ways to handle multi-threading in servlets?
How do I use cookies to store session state on the client?
What is http servlet? Explain with the help of an example.
What's the difference between servlets and applets?
Difference between GET and POST?