Servlet Tutorials

Servlet Tutorial
Previous Home Next

Introduction of Servlet

Servlets It is a kind of server side scripting, server side validations, server side programming, server side processing. used to create the dynamic web pages.(optional)

It is a kind of server side Technology, use to host dynamic data on the web server.

Servlet technology is generally to generate web application with dynamic web page.

Servlet can be performed as a CGI (Common Gateway Interface) with scripting language.

In this server side scripting languages are used many interfaces and classes in the servlet API such as Servlet, GenericServlet, HttpServlet, ServletRequest, ServletResponse

What is web application?

A web application is an application accessible from the web. A web application is composed of web components like Servlet, JSP, Filter etc. and other components such as HTML. The web components typically execute in Web Server and respond to HTTP request.

CGI(Common Gateway Interface)

In CGI technology can be enables the web server to call an external program and pass HTTP request information to the external program to process the request. For each request, it starts a new process.

There are some important statemnent of Servlet

  1. To create web application.
  2. Many interfaces and classes are used.
  3. To create dynamic web page and deployed on the server

Advantage of Servlet

  1. better performance: Due to it creates a thread for each request not process.
  2. Portability: because it uses java language.
  3. Robust: Servlets are managed by JVM so no need to worry about momory leak, garbage collection etc.
  4. Secure: because it uses java language..

Disadvantages of CGI

  1. If number of clients increases, it takes more time for sending response.
  2. For each request, it starts a process and Web server is limited to start processes.
  3. It uses platform dependent language e.g. C, C++, perl.
Previous Home Next