Java Servlet Programing Laungage

Java Servlet Projects

Servlet Project 3

Java Servlet : Introduction to Servlet, Advantages over CGI(), USAGE
Previous Home Next
adplus-dvertising

Introduction to Servlet

A servlet is a server side programming language .A servlet is a technology provided by Sun Microsystem which facilitate dynammic web applications in java.A software developer may use a servlet to add dynamic content to a Web server using the Java platform. Servlets are protocol and platform independent server-side software components, written in Java.

They run inside a Java enabled server or application server, such as the WebSphere Application Server. Servlets are loaded and executed within the Java Virtual Machine (JVM) of the Web server or application server, in much the same way that applets are loaded and executed within the JVM of the Web client. Since servlets run inside the servers, however, they do not need a graphical user interface (GUI). In this sense, servlets are also faceless objects.

The term servlet is used in two different context with two different meanings:

  1. As a technology,it represents set of classes and interfaces provided by Sun microsystem which facilitate developmant of dynammic web applications.
  2. As a web application,a servlet is a java class that is defined using servlet API's for processing request in a web application.

Advantages over CGI:

CGI was an protocol that specifies a standard mode of communication between web servers and CGI script.Execution of CGI script was process based i.e. for each request a new process was started by the web server.Process based execution limits the scalability of the application.

CGI scripts were platform dependent.Servlet as a technology of web application development remove both the problems associated with CGI by provide a thread based execution model and platform dependent components.

USAGE:

Servlets are most often used to manage state information that does not exist in the stateless HTTP protocol, such as:

  • filling the articles into the shopping cart of the appropriate customer.
  • provide dynamic content such as the results of a database query
  • process or store data that was submitted from an HTML form
Previous Home Next