Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. A Servlet is a
Java class which conforms to the Java Servlet API, a protocol by which a
Java class may respond to http requests. Thus, a software developer may
use a servlet 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 non-Java dynamic Web
content technologies such as CGI and ASP.NET. Servlets can maintain
state in session variables across many server transactions by using HTTP
cookies, or URL rewriting.