Whats the advantages using servlets over using CGI?



Whats the advantages using servlets over using CGI?..

Answer / Piyush Mishra

Servlets offer several advantages over CGI:
1. Reusability: Servlets can be reused for multiple requests, whereas CGI programs are executed from scratch for every request.
2. Performance: Since servlets are loaded into the server's memory only once and share resources, they offer better performance compared to CGI.
3. Simplicity: Servlets provide a simpler programming model than CGI since they can leverage Java's powerful libraries for handling requests and responses.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Servlets Interview Questions

what is the control flow in servlet when we send a request?

5 Answers   TCS,


Explain the architechure of a servlet?

1 Answers  


Explain get and post.

1 Answers  


What is the <load-on-startup> element?

1 Answers  


What is use of parseQueryString ?

1 Answers  


What is the difference between portlet and servlet?

1 Answers  


What are the benefits of using servlet over cgi?

1 Answers  


Hi Friends, Can we make any method thread safe withour synchronized keyword?

2 Answers  


What are the difference between session and cookies in servlet? Explain

1 Answers  


What is servlet and list its types?

1 Answers  


How to get the path of servlet in the server?

1 Answers  


Which HTTP method is non-idempotent?

1 Answers  


Categories