|
|
Servlet and Applet
|
What is the difference between an Applet and a Servlet?
Answer
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()
|
|
|
|
|