java2db

Introduction to a Servlet and its Advantages



What is a Servlet ?

Servlet and its AdvantagesServlet is a java based server side web technology to develop dynamic web resource programs . These web applications have capability to generate dynamic web pages.

Servlet and its AdvantagesServlets are usually designed to process HTTP requests and responses (such as get and post).It is a single instance and multiple threads principle base server side technology.

Servlet and its AdvantagesIt is an API specification ,Which means it provide rules and guidelines to develop a Servlet container software .

 

Servlet API(Application programming Interface) :

The Servlet API is a part of the Java Servlet specification.This API Contained set of classes and interfaces that supported by all Servlet containers (Example :Tomcat,GlassFish and Weblogic….).

javax.servlet  and  javax.servlet.http  are the jar files which is having all the (Servlet API) classes and interfaces.

 

Servlet and its Advantages :

Servlet and its Advantages Servlet technology is faster than CGI (Common Gateway Interface).

Servlet and its Advantages Platform independent .So it can run on any platform.

Servlet and its Advantages It does not run in a separate process. There is only a single instance, which handles all requests concurrently.So this saves memory .

Servlet and its Advantages Servlet is a server side component, so it can inherits the security provided by the Web/Application server and  also benefited with Java Security Manager.

 




Related Posts :
Servlet Filter ( Request and Response filters in servlets ) example
URL rewriting in servlets ( Servlet session tracking )
Servlet Cookies ( Servlets session tracking with cookie )
Hidden form field in servlets ( Servlet session tracking )
Request attributes in servlet with an example ( Attribute scope )
Session attributes in servlet with example (Attribute scope)
ServletConext Attributes in servlet ( Attribute scope )
The sendRedirect (servlets are in different web applications)
   [will not be published]



^ <