Servlets, like applets, are reusable Java applications. Servlets, however, run on a web server rather than in a web browser.
Servlets provide a component-based, platform-independent method for building web-based applications without the performance overheads, process limitations, and platform-specific liabilities of CGI programs.
Servlets supported by the Web Server are based on the Java Servlet 2.5 specification. Servlets are created compiled and packed into a Java web application archive WAR file and then deployed to the Web Server and managed at runtime by the servlet engine
Basic characteristics of servlets include the following:
Operate on input data that is encapsulated in a request object
Respond to a query with data encapsulated in a response object
Provide user session information persistence between interactions
Allow dynamic reloading while the server is running
Can be addressed with URLs. For examples, buttons on an application's pages often point to servlets
Can call other servlets and/or JSP pages