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
Explains the differences between context.getrequestdispatcher() and request.getrequestdispatcher()?
What are the different methods involved in the process of session management in servlets?
Is dispatcher servlet a singleton?
What is java servlet?
What do you mean by mime type?
What are different Authentication options available in Servlets.
What methods do you use in servlet - applet communication?
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
What are the life-cycle methods for a servlet?
Can we use threads in Servlets?
Whether thread can be used in servlets?
Is java servlet still used?
Is it possible to have a constructor inside the servlet?
How we can call a jsp from the servlet?
What are the kinds of http requests?