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
What are advantages of servlets over cgi?
What is cookies in servlet with example?
What are the difference between session and cookies in servlet? Explain
What is servlet interface?
Is servlet a server side scripting language?
request parameter how to find whether a parameter exists in the request object?
What are Servlets?
What is the dispatcher servlet?
What do you mean by request dispatcher in servlet?
What is servlet name in web xml?
I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>
Name the packages that work with servlet?
What is called servlet mapping?
What mechanisms are used by a Servlet Container to maintain session information?
What is the capacity the doget can send to the server?