What is the difference between an applet and a servlet?
Answer Posted / sahil verma
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()
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Why doesn’t a servlet include main()?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
If a servlet is not properly initialized, what exception may be thrown?
How can you push data from an Applet to a Servlet?
How can we perform any action at the time of deploying the project?
Why filter is used in servlet?
What are the benefits of using servlet over cgi?
How to get the actual path of servlet in server?
What is servlet lazy loading?
What is servlet api used for conneting database?
Differentiate between the web server and application server?
What is java servlet session?
Explain servlet events?
What must be implemented by all servlets?
What is a cookie What is the difference between session and cookie