Free Jobs
Reference




Java Forums: Core Java (15) J2EE (3) EJB (5) Servlet (3) JDBC (6) Hibernate (2) Struts (1) Swing (1) Oracle (7) JSP (4) Other (10)

Topic: What are the main advantages of Servlet over CGI

To get the Posted Questions details daily in your mail Click Here

Share this Post on Facebook/Twitter/Orkut Bookmark and Share





User: shruti888 Post Date: 15 Jun 2011 14:30

Introduction:
What are the main advantages of Servlet over CGI



Main Content:

1.Servlet is by default persistent while CGI is not persistent by default

2.Servlet is stateful by default but CGI is not.

3.Servlet written in java can utilise the oops concepts of java but CGI

is not necessarily written in java.


4.Servlet written in java can be seamlessly integrated with other java

   thechnologies like JDBC but CGI is not necessarily written in java.


Conclusion:
Thus servlets are more advantageous than CGI



About Writer:
Hi I am Java Developer from Bangalore


Writer's Link:

Writer's Email:







Comments:
  • User: linkin Post Date:   04 Dec 2011 13:44
    CGI , for every request creates instance and destroy instance of the respective class , on other hand servlet instance is created during server startup (using <load-on-start> tag in WEB-INF/web.xml) or during first request and get destroyed only during redeploy or server shutdown , it reuses the servlet object for all request and response.


Post Comment





Similar Articles Top ArticlesLatest Articles Other Articles by this Author







www.freejobsreference.com Copyright © 2009-2011 | All Rights Reserved
All content of this website is protected by copyright laws and should not be reproduced in any form or by any means without written permission
(Best viewed in IE 8.0+ or Firefox 3.0+ at resolution of 1024 * 768 or higher)