What is the difference between an applet and a servlet?

Answer Posted / radhika

APPLETS:
1)It is a special type of java program which runs
on any web browser.
2)Applets resides at server but when client makes a
request it completely loaded into a place in the browser.
that place is known as SAND BOX.
3)Applet lives inside the sand box only. it does'nt
have any access to any things which exists out side of the
sand box.
4) Applets can't communicate with any other server
except where they resides.
5)Applets are useful to develop the static web pages.

SERVLETS:

1) Servlet is a purely server side program
2) Servlets always runs in the server.
3) Servlets can be placed in any web and
application servers.
4) Servlets are useful to develop the dynamic web
pages.

Is This Answer Correct ?    107 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use the constructor, instead of init(), to initialize servlet?

580


How to generate the server side programming and the advantages of it over the other languages?

558


Describe some assignments that are executed by servlet container?

579


Why the container loads server at the application startup and how?

579


How can you use a servlet to generate a plain text instead of html?

590






What do you mean by singlethreadmodel interface?

578


How we can call a jsp from the servlet?

529


What is the use of request dispatcher interface?

567


What is difference between jsp and servlet?

642


What are the different ways we can maintain state between requests?

567


Explain web application directory arrangement?

585


What is servlet lazy loading?

691


Does servlet have main method?

687


Write a simple servlet program to print the contents of html.

545


Who is responsible to create the object of servlet?

716