Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the importance of init() method in Servlet ?

1046


What is the difference in between the httpservlet and generic servlet?

1076


Which event is fired at the time of setting, getting or removing attribute from application scope?

1090


What do you mean by chaining in servlet?

999


Explain the role of dispatcherservlet and contextloaderlistener.

1137


what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?

999


What’s the use of the servlet wrapper classes??

1068


How is the get () method different from the post() method?

923


What is the workflow of a servlet?

1132


Why don't we write a constructor in a servlet?

1002


request parameter how to find whether a parameter exists in the request object?

965


Explain the methods of request dispatcher in servlet?

996


What is http servlet in java?

1022


What is Client-Server Computing?

2365


What if you need to span your transaction across multiple servlet invocations?

1045