What is Servlet

The Servlet is a type of Java class used in Java web applications which enhances the capabilities of a server. These Java servlets runs on a web application server container. These servlets are used to generate HTML content to be shown on the Web browser. At the lowest level it is nothing but a Java class.

Servlet-Request-Response-Model

Servlets are designed to respond to a request from user’s browser and send back response content. A servlet is mostly implemented for the HTTP protocol and thus the name HTTP Servlet. In the Java platform Servlets are used to generate the dynamic HTML content in general. They can also be used to create and respond with XML, excel, pdf, json and any other formats as required.

Servlet Request Response Model

In general, web browser will be the client in the servlet request response model. The browser will send a request and it will be served by a HTTP server. In the backend, HTTP server will utilize the services of a servlet container to generate the dynamic content.

Important classes and packages of the Servlet API are,

Servlet Overview

Servlet Releases

This Servlet tutorial was added on 27/07/2014.

Comments on "What is Servlet" Tutorial:

  1. […] are some of the tech jargons related to Java Servlet […]

  2. […] run the Java Servlets we need a Servlet container like Apache Tomcat. Before going into detail of installing the servlet […]

  3. […] tutorial is the standard Hello World program using Java Servlet. Using an IDE is the best choice to do development. It will help to increase the productivity. If […]

Comments are closed for this "What is Servlet" tutorial.