SERVLET
Submitted by,
B. Soundarya, B.Sc,
Nadar Saraswathi College of Arts and
Science,
Theni.
SERVLETS
Servlet is a simple java program
that runs an a java enabled web
server or application server.
They are used to handle the
request obtained from the web
serve, process the request,
produce the response, then
response back to the web
server.
PROPERTIES OF SERVLET
Servlets work on the
server side.
Servlet capable of
handling complex
request obtained from
web server.
EXECUTION OF
SERVLET
Execution of servlets involves the six basic step’s:
1. The client send the request to the web
server.
2. The web server passes the request and
corresponding servlet.
3. The web server receive the request.
4. The servlet processes the request and
generate in the response in the form of output.
5. The servlet send the response back
to the web server.
SERVLET ARCHITECTURE
WEB BROWSER
WEB SERVER
SERVLET PROGRAM
DATABASE
ADVANTAGE OF A JAVA
SERVLET
 Servlet is faster than CGI as it not
involve the creation of a new process
every new request received.
 Servlet as written in java are platform
independent.
 Remove the overhead of creation a new
process for each request of Servlet
doesn’t run in a separate process.
 It is server side components, Servlet
inherits the security provided by the web
server.
SERVLET CONTAINER
 It also know as servlets engine is an
integrated set of object that
provided run time environment for
java servlets components.
 In simple words, it is a system that
manages java servlets components
on top of the web server to handle
the web client request
SERVICES PROVIDED BY THE
SERVLET CONTAINER
Networking Services
Decode and encode MIME based
messages
Manage Servlet container
Resource Management
Security Service
Session Management
NETWORK SERVICES
Load a Servlet class. The loading
may be from a local file system,
a remote file system or other
network service.
The Servlet container provides
the network service over which
the request and response are
sent.
DECODE AND ENCODE
MIME BASED MESSAGES
Provides the service of
decoding and encoding
MIME- based message.
Encoding the container
provides the network
services.
MANAGE SERVLET
CONTAINER
 Manage lifecycle of a Servlet.
 Three methods are central to the
life cycle of a Servlet.
 These are init(),service(),and
destroy(). They are implemented by
every Servlet and are invoked at
specific times by the server
RESOURCE
MANAGEMENT
 Manages the static and dynamic
resource such as HTML files,
Servlet and JSP page.
 The init( ), service( ), and destroy( )
methods are the life cycle methods
of the Servlet.
 These are invoked by the server.
The get Servlet Con fig( ) method is
called by the Servlet to obtain
initialization parameters.
SECURITY SERVICES
Handle authorization and
authentication of resource
access.
The Servlet Request interface
includes methods that allow you
to read the names and values of
parameters that are included in
a client request.
SESSION MANAGEMENT
 Maintains a session by appending a session
ID to the URL path.
 The Http Servlet class provides
specialized methods that handle the
various types of HTTP requests.
 A Servlet developer typically overrides
one of these methods.
 These methods are do Delete(), doGet(),
doHead(), doOptions(), doPost(), doPut(),
and doTrace().
THANK YOU!!!

servlet in java

  • 1.
    SERVLET Submitted by, B. Soundarya,B.Sc, Nadar Saraswathi College of Arts and Science, Theni.
  • 2.
    SERVLETS Servlet is asimple java program that runs an a java enabled web server or application server. They are used to handle the request obtained from the web serve, process the request, produce the response, then response back to the web server.
  • 3.
    PROPERTIES OF SERVLET Servletswork on the server side. Servlet capable of handling complex request obtained from web server.
  • 4.
    EXECUTION OF SERVLET Execution ofservlets involves the six basic step’s: 1. The client send the request to the web server. 2. The web server passes the request and corresponding servlet. 3. The web server receive the request. 4. The servlet processes the request and generate in the response in the form of output. 5. The servlet send the response back to the web server.
  • 5.
    SERVLET ARCHITECTURE WEB BROWSER WEBSERVER SERVLET PROGRAM DATABASE
  • 6.
    ADVANTAGE OF AJAVA SERVLET  Servlet is faster than CGI as it not involve the creation of a new process every new request received.  Servlet as written in java are platform independent.  Remove the overhead of creation a new process for each request of Servlet doesn’t run in a separate process.  It is server side components, Servlet inherits the security provided by the web server.
  • 7.
    SERVLET CONTAINER  Italso know as servlets engine is an integrated set of object that provided run time environment for java servlets components.  In simple words, it is a system that manages java servlets components on top of the web server to handle the web client request
  • 8.
    SERVICES PROVIDED BYTHE SERVLET CONTAINER Networking Services Decode and encode MIME based messages Manage Servlet container Resource Management Security Service Session Management
  • 9.
    NETWORK SERVICES Load aServlet class. The loading may be from a local file system, a remote file system or other network service. The Servlet container provides the network service over which the request and response are sent.
  • 10.
    DECODE AND ENCODE MIMEBASED MESSAGES Provides the service of decoding and encoding MIME- based message. Encoding the container provides the network services.
  • 11.
    MANAGE SERVLET CONTAINER  Managelifecycle of a Servlet.  Three methods are central to the life cycle of a Servlet.  These are init(),service(),and destroy(). They are implemented by every Servlet and are invoked at specific times by the server
  • 12.
    RESOURCE MANAGEMENT  Manages thestatic and dynamic resource such as HTML files, Servlet and JSP page.  The init( ), service( ), and destroy( ) methods are the life cycle methods of the Servlet.  These are invoked by the server. The get Servlet Con fig( ) method is called by the Servlet to obtain initialization parameters.
  • 13.
    SECURITY SERVICES Handle authorizationand authentication of resource access. The Servlet Request interface includes methods that allow you to read the names and values of parameters that are included in a client request.
  • 14.
    SESSION MANAGEMENT  Maintainsa session by appending a session ID to the URL path.  The Http Servlet class provides specialized methods that handle the various types of HTTP requests.  A Servlet developer typically overrides one of these methods.  These methods are do Delete(), doGet(), doHead(), doOptions(), doPost(), doPut(), and doTrace().
  • 15.