What is the difference between an Applet and a Servlet?Applets :
- Applets are applications designed to be transmitted over the network and executed by java compatible web browsers.
- An Applet is a client side java program that runs within a web browser on the client machine.
- An applet can use the user interface classes like AWT or Swing.
- Applet Life Cycle Methods: init(), stop(), paint(), start(), destroy().
Servlets :
- Servlets are java based analog to CGI programs, implemented by means of servlet container associated with an HTTP server.
- Servlet is a server side component which runs on the web server.
- The servlet does not have a user interface.
- Servlet Methods: doGet(), doPost()
|