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
What is getservletcontext?
Which exception is thrown if the servlet is not initialized properly?
If my browser does not support cookie, and my server sends a cookie instance what will happen?
What is the effective way to make sure all the servlets are accessible only when user has a valid session?
Why is a constructor needed in a servlet even if we use the init method?
What if we pass negative value in load-on-startup?
What do you mean by the servlet chaining?
What are the important functions of filters?
What is Client-Server Computing?
How do you configure a centralized error handler in servlets?
Explain get and post.
How can you push data from an Applet to a Servlet?
What is the difference between servlet and jsp?
Explain the servlet context.
How native code can be used in a servlet?