esuslogo
 [To advertise Java(tm) Events here, contact joris@esus.com!]
banner

Java™
by example!






New @ Esus.com


  gb  In-house search engine for better results!

  gb  Get updates with the esus.com
newsletter!









  Home 
 Browse Categories 
 Ask a Java Question 
 Help 
  For Java Tips & Tricks, subscribe to the esus.com newsletter!
Search Java Q&A, Links, API's:   adv 

How do Servlets compare to CGI?
A couple advantages of Servlets over CGI:

Servlets
- don't start up a new process for each request coming in (traditional CGI scripts do!). Instead threads inside the same VM process are executed.
- are written in the Java language and you have access to all its API's
- are written in the Java language and are thus portable
- allow you to focus on your core business, lots of things are done behind the scene, like parsing and decoding form data.
- can talk to the webserver (cgi's can't)
- can be fired up when the webserver starts up and can share data among instances (useful if you want to implement DB connection pooling)

Also, check out the following sites:

http://java.sun.com/features/1998/03/inetbiz.html
http://citeseer.nj.nec.com/333940.html
http://www.ecst.csuchico.edu/~gmurray/presents/servlets.html


Further Information
Author of answer: Joris Van den Bogaert

Comments
Comments to this answer are only viewable by members. Login or become a member!





Terms of Service | Privacy Policy | Contact

Copyright © 2000-2003 Esus.com - All Rights Reserved 
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. Esus.com is independent of Sun Microsystems, Inc. All other trademarks are the sole property of their respective owners.