Servlets - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

Servlets

Description:

Requests from the client implement the ServletRequest interface. ... Creating polite long-running methods. What We Covered. What is a servlet. Servlet Life Cycle ... – PowerPoint PPT presentation

Number of Views:94
Avg rating:3.0/5.0
Slides: 12
Provided by: patrick99
Category:

less

Transcript and Presenter's Notes

Title: Servlets


1
Servlets
  • Java Web Components

2
What Well Cover
  • What is a servlet
  • Servlet Life Cycle
  • Information Sharing
  • Service methods
  • Filters
  • Other resources
  • Client State
  • Finalization

3
What is a Servlet
  • Java based web component
  • Servlet advantages
  • Managed by a container
  • Generates dynamic content
  • Client interaction via request/response
  • Servlet containers/servlet engines

4
Servlet Life Cycle
  • New servlet instance in container
  • Init() method
  • Static initializers
  • Error conditions on the init
  • Handling requests
  • Multithreading
  • Errors handling requests

5
Information Sharing
  • Scope objects
  • Web context
  • Session object
  • Request object
  • Page object
  • Shared Resources
  • Database access

6
Service Methods
  • Service methods provide access to the services of
    the servlet or Jsp.
  • Requests from the client implement the
    ServletRequest interface.
  • Service methods include the ServletRequest and
    the ServletResponse.
  • HttpServletResponse includes fields representing
    HTTP headers

7
Filters
  • Programming Filters
  • Programming Customized Requests and Responses
  • Specifying Filter Mappings

8
Other Resources
  • Invoking other resources
  • Including other resources in the response
  • Transferring control to another web component
  • Accessing the Web Context

9
Client State
  • Accessing a Session
  • Associating objects with a session
  • Session Management
  • Session Tracking

10
Finalization
  • Finalizing a servlet
  • Tracking service requests
  • Notifying Methods to shut down
  • Creating polite long-running methods

11
What We Covered
  • What is a servlet
  • Servlet Life Cycle
  • Information Sharing
  • Service methods
  • Filters
  • Other resources
  • Client State
  • Finalization
Write a Comment
User Comments (0)
About PowerShow.com