what is a servlet? is it anything like an applet but server-side or something?
Printable View
what is a servlet? is it anything like an applet but server-side or something?
That's right. A servlet runs on your webserver and processes HTTP messaging. Intended for dynamic data on your site. Useful to support downloads.
Aye, aye Captain!!
A servlet is a Java class file that runs within a JVM on the webserver. The webserver can be instructed to pass special types of files only through the servlet, or a client can directly invoke a servlet.
At the first request from a client for a servlet, the webserver loads an instance of the servlet into memory, and henceforth all client calls to that servlet are handled by this object instance. So there are less overheads in creating and destroying object instances. This feature claims servlets to be better than CGI programming.
Also the Java security manager makes servlets web-server friendly, and so are claimed to be better than ASP and other such technologies.
.