Explain the difference between servlet and cgi?



Explain the difference between servlet and cgi?..

Answer / Divyam Gupta

Servlet and CGI (Common Gateway Interface) are both used to extend the functionality of HTTP servers, but they have some differences. Servlets are written in Java and compiled bytecode, while CGIs are scripts written in various languages like Perl, C++, etc. Servlets can handle multiple requests concurrently, while CGIs can only handle one request at a time.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Servlets Interview Questions

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 >>

1 Answers   ProKarma,


What is a servlet engine?

1 Answers  


What's the difference between authentication and authorization?

1 Answers  


Which java application server is the best?

1 Answers  


Describe servlet?

1 Answers  


What is servletconfig?

1 Answers  


Explain the difference between servletconfig and servletcontext in servlet?

1 Answers  


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

1 Answers  


The code in a finally clause will never fail to execute, right?

1 Answers  


What do you mean by request dispatcher in servlet? Also explain its methods.

1 Answers  


Write all the phases defined in servlet life cycle?

1 Answers  


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

1 Answers  


Categories