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 difference between the http servlet and generic servlet?
What is the use of welcome-file-list?
What are the types of protocols supported by httpservlet ?
What is a server side include (ssi)
Explain get and post.
What is MIME Type?
What are the servlet events?
What are the different methods involved in generic servlet?
Differentiate between get and post?
Should I override the service() method?
How to rectify errors in java servlet while compilation?
What is webservlet?
Describe in brief RequestDespatcher?
What are the phases of servlet life cycle?
What is the difference between sendredirect() and forward() in a servlet?