What is the difference between servlets and applets?

Servlets are to servers. Applets are to browsers. Unlike applets, however, servlets have no graphical user interface.

Showing Answers 1 - 6 of 6 Answers

Denis Wang

  • Jun 30th, 2005
 

One lives in the server side web container, the other lives in the client side browser.

  Was this answer useful?  Yes

SankaraNarayanan

  • Oct 3rd, 2005
 

Applets are extend the browser and Servlets are extend by Webserver.But Applets are not supported to write any info to other file.

  Was this answer useful?  Yes

Bhavesh kataria

  • Apr 11th, 2007
 

Servlet does not have main() method. Instead in the process of handling request, the server dispatches a request to a servlet, it invokes the servlet’s service methods
but applet have main() method

  Was this answer useful?  Yes

mr.X

  • Apr 23rd, 2007
 

Applets do not have main() method...

  Was this answer useful?  Yes

But Servlet is a Server Side Component. It is a Controller in the MVC architecture, It is used to perform business logic and does not deal with the visual implementation. The visual part is done by using JSP/ velocity..
 
The Servlets create synchronized access for multiple reuqests and normally dispatch the requests for a particular Model. ex. database access, name resolution etc.
 
The Servlets are run on the Server Side.
 
Servlet has doGet() or doPost() methods that need to be over-rided.
You can also have init(), service () and destroy() methods in the lifecycle of a Servlet

Applets- they determine the visual components,. the applet can interact with the servlet. the applets can be run in the browser, The applets are run on the client side. Applets have init(), start(),stop() and  destroy() methods in the lifecycle of a applet that need to be over-rided.

Correct me if I am wrong,
 

  Was this answer useful?  Yes

shubhra

  • Sep 30th, 2011
 

Applet have no main method. It executes in browser
but servlet is a server side program it executes in application server.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Answer Question

Click here to Login / Register your free account


 
Send   Reset

 

Related Answered Questions

 

Related Open Questions