A Java application that runs in a Web server or application server and provides server-side processing such as accessing a database and e-commerce transactions. Widely used for Web processing, servlets are designed to handle HTTP requests (get, post, etc.) and are the standard Java replacement for a variety of other methods, including CGI scripts, Active Server Pages (ASPs) and proprietary C/C++ plug-ins for specific Web servers (ISAPI, NSAPI).|
Because they are written in Java, servlets are portable between servers and operating systems. The servlet programming interface (Java Servlet API) is a standard part of the J2EE platform. If a Web server, such as Microsoft's Internet Information Server (IIS), does not run servlets natively, a third-party servlet plug-in can be installed to add the runtime support. See servlet container, Java, application server, JSP, J2EE, ISAPI, NSAPI and CGI script.
Servlets, as well as JavaServer Pages (JSPs), are server-side applications. The Web server or application server must support servlet processing, which became available as part of the Java 2 platform.