What Is a Servlet?
A servlet is any Java class that can be invoked and executed on a server, usually on behalf of a client. A servlet works on the server, while an applet works on the client. An HTTP servlet is a Java class that handles an HTTP request and delivers an HTTP response. HTTP servlets reside on an HTTP server and must extend the JavaSoft javax.servlet.http.Http Servlet Class so that they can run in a generic servlet engine framework.
Some advantages of using HTTP servlets are:
- They are written in a well-formed, and compiled language (Java), so are more robust than “interpreted” scripts.
- They are an integral part of the HTTP server that supports them.
- They can be protected by the robust security of the server, unlike some CGI scripts that are hazardous.
- They interact with the HTTP request through a well-developed programmatic interface, and so are easier to write and less prone to errors.
Parent topic: Using Servlet Connectivity for Oracle Tuxedo