Difference between an Applet and a Servlet

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()
Servlet HTTP Tunneling - Define HTTP Tunneling?
Servlet HTTP Tunneling - The solution is to have them encapsulated in http or https and sent as an HttpRequest. Thus, masking other protocols as http requests is called HTTP Tunneling...
Difference between ServletConfig and ServletContext
Servlet ServletConfig and ServletContext - ServletConfig is a servlet configuration object. It is used by a servlet container to pass information to a servlet during initialization...
What is the difference between doGet() and doPost()?
In doGet(), the parameters are appended to the URL and sent along with header information...
Post your comment