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
How do servlets work?
Difference between httpservlet and generic servlets?
How do we go with database connection and log4j integration in servlet?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
How can the referrer and the target urls be used in servlet?
Explain in brief the directory structure of a web application?
What do you mean by session tracking and also explain its techniques?
What is cookie in servlet?
What are all the protocols supported by httpservlet?
What is the difference between the servlets and cgi programs?
Which java framework is most popular?
Is it possible to have a constructor inside the servlet?
What do you mean by annotations in servlet?
How do I know if java is running on linux?
Differentiate between the get and post method