Java Servlet
Servlets are the Java programs that runs on the Java-enabled web server or application server. They are used to handle the request obtained from the web server, process the request, produce the response, then send response back to the web server.
Properties of Servlets :
- Servlets work on the server-side.
- Servlets capable of handling complex request obtained from web server.
Execution of Servlets
- The
clientssend therequestto theweb server. - The
web server receivesthe request. - The
web server passesthe request to the correspondingservlet. - The
servlet processes the requestandgenerate the responsein the form of output. - The
servlet send the responseback to theweb server. The
web serversends theresponseback to theclientand the client browser displays it on the screen.
Server-side extensions
- Java Servlet is one of the component APIs of Java Platform Enterprise Edition which sets standards for creating dynamic Web applications in Java.
- Common Gateway Interface(CGI) scripts
- Hypertext Preprocessor (PHP)
Java Servlets are more acceptable since they solve the limitations of CGI such as low performance and low degree scalability.
CGI
CGI is actually an external application which is responsible for processing client requests and generating dynamic content

