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 is the major difference between servlet and applet?
What are the ways to handle multi-threading in servlets?
Can you use javascript in servlets?
How do you find out what client machine is making a request to your servlet
Why do we have servlet listeners?
what do you understand by url rewriting?
What is meant by a web application
What do you mean by url pattern in servlet?
How can we include static files in the jsp page?
Why are http servlets used in programming?
How we can create war file in servlet?
What is difference between server and servlet?
Which interface must be implemented by all servlets?
How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255
Which protocol will be used by browser and servlet to communicate