Introduction to Servlets
A servlet is a Java programming language class used to extend the capabilities of servers that host applications accessed by means of a request-response programming model. Although servlets can respond to any type of request, they are commonly used to extend the applications hosted by web servers. Applet and Servlet are the small Java programs or applications. But, both get processed in a different environment. The applet is usually embedded in an HTML page on a Web site and can be executed from within a browser .
following are the differences between applets & servlets.
APPLETS |
SERVLETS |
Applet is
a Java programme which is executed on the client machine. |
Servlet is
a Java programme that runs inside JVM on the web server. |
Life cycle of Applets are: init(), stop(), paint(), start(), destroy(). |
Life cycle of servlets are: init( ), service( ), and destroy( ). |
Applets are
more prone to risk as it is on the client machine. |
Servlets are under the server security. |
Applets may have Graphical User Interface |
Servlets have no Graphical User Interface |
Applets
extend the web browser. |
Servlets
extend the web server. |
No comments:
Post a Comment