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 use of attribute in servlets?

1084


How would you create deadlock on your servlet?

1225


Which event is fired at the time of project deployment and undeployment?

1365


How do I support both get and post from the same servlet?

1255


How can you push data from an Applet to a Servlet?

1150


What is the use of servlet context?

1105


When a servlet accepts a call from a client, it receives two objects. What are they?

1304


Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?

1311


What is difference between server and servlet?

1139


Explain the difference between jsp and servlet?

1148


Tell the new features added in servletrequest interface i.e. Servlet 2.4

1225


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

1141


Explain their methods? Tell me their parameter names also have you used threads in servlet?

1099


What is difference between get and post method?

1152


What is the use of servletconfig interface?

1085