elibraryportal Logo

What is Servlet

→ Servlet is a technology for developing Web Applications in Java. Apart from technology, Servlet term is also used to describe those programs .

→ Java Servlets sit at server side and generates dynamic web pages based on client request.

→ Servlet technology is used to create web application resides at server side and generates dynamic web page.

→ Servlet is an API that provides many interfaces and classes

→ Which are developed using this technology. As an Application Component, Servlet represents such programs which are executed within a Web Server and generates dynamic html. Before Servlets, Dynamic Web Applications used to be developed using CGI.

CGI is a protocol that defines standard mode of communication between web server and program. In case of CGI based application, programs were written in C, C++ or perl. These programs were called CGI scripts.

Servlet CGI

CGI based applications had following two problems-

  • CGI scripts were platform dependent.
  • CGI scripts were executed as processes which use to create lot of overhead.
Next TopicServlet API