A servlet is a server-side Java component that contains the business logic of an application. Just as an applet is a Java plug-in for a Web browser, a servlet is a Java plug-in for a Web server. Sun has defined a standard Java interface for servlets. Web servers can be extended to host servlets through a servlet engine, which is a high performance plug-in that runs a Java virtual machine (JVM). The servlet engine manages servlets, maintains HTTP session state using cookies and local data stored on the server, and can store user profiles.
Java's replacement for CGI scripts (embeds HTML in java).
A Java program that runs as part of a network service, typically on a Web server and responds to web requests from clients.
Java programs running on demand on servers.
The Java Servlets API allows a software developer to add dynamic content to a web server using the Java platform. The generated content is commonly HTML, but may be other data such as XML. Servlets are the Java counterpart to dynamic web content technologies such as CGI or ASP. It can maintain state across many server transactions. This is done using HTTP Cookies, session variables or URL rewriting.
Allow users to run Java code on the server and send HTML pages to a browser.
Generic server extensions dynamically loaded when needed by the web server
Server-side programs that give Java technology-enabled servers additional features. Servlets provide web developers with a simple, consistent mechanism for extending the features of a web server and for gaining access to existing business systems. See also JSP.