SlideShare a Scribd company logo
Advanced java programming
Servlet API & Servlet Http package
By
P.Abinaya
Servlet api & servlet http package
 Two packages contain the classes and
interfaces that are required to build
servlets.
 Then are javax.servlet and
javax.servlet.http.
 The Servelt API has been in a process of
ongoing development and enhancement.
 The current servlet specification is version
2.4.
Servlet api & servlet http package
 The javax.servlet.http package
contains a number of classes and
interfaces that describe and define the
contracts between a servlet class
running under the HTTP protocol and
the runtime environment provided for
an instance of such a class by a
conforming servlet container.
 init()
 Service()
 Destroy()
 That methods are the life cycle methods of
servlet.
 The getServletConfig() method is called by
the servlet to obtain initialization
parameter.
HttpServletRequest
Extends the ServletRequest interface
to provide request information for
HTTP servlets.
HttpServletResponse
Extends the ServletResponse interface
to provide HTTP-specific functionality
in sending a response.
The javax.servlet.http package
contains a number of interfaces
and classes that are commonly
used by servlet developers.
That its functionality makes it
easy to build servlets that work
with HTTP requests and
responses.
 The HttpServletRequest Interface
 Extends the ServletRequest interface to
provide request information for HTTP
servlets.
 The HttpServletRequest Interface
Extends the ServletResponse interface to
provide HTTP-specific functionality in
sending a response.
 The Cookie class encapsulates a cookie.
 A cookie is stored on a client and contains
state information.
 Some of the information that is saved for
each cookie includes the following:
o The name of the cookie.
o The value of the cookie.
o The expiration date of the cookie.
o The domain and path of the cookie.
 The HttpServlet class provides specialized
methods that handle the various types of
HTTP requests.
 The methods are
 doDelet()
 DoGet()
 doHead()
 doOptions()
 doPut()
 doTrace().
Servlet api & servlet http package

More Related Content

What's hot (20)

PPTX
Chapter 3 servlet & jsp
Jafar Nesargi
 
PPTX
Servlets
Rajkiran Mummadi
 
PPT
Listeners and filters in servlet
Shree M.L.Kakadiya MCA mahila college, Amreli
 
PPT
Java Servlet
Rajiv Gupta
 
PPT
Java Servlets
Nitin Pai
 
PPT
Servlet ppt by vikas jagtap
Vikas Jagtap
 
PPTX
Servlets
ZainabNoorGul
 
PPT
Web Tech Java Servlet Update1
vikram singh
 
PDF
Servlet and servlet life cycle
Dhruvin Nakrani
 
PPT
Java Servlets
BG Java EE Course
 
PPTX
java Servlet technology
Tanmoy Barman
 
PPT
Java servlet life cycle - methods ppt
kamal kotecha
 
DOC
Java Servlets & JSP
Manjunatha RK
 
PPTX
Servlets
Geethu Mohan
 
PDF
java servlet and servlet programming
Kumar
 
PPTX
Servlet.ppt
VMahesh5
 
PPTX
Java Servlets
Emprovise
 
PPT
Servlet/JSP course chapter 1: Introduction to servlets
JavaEE Trainers
 
PPTX
UNIT-3 Servlet
ssbd6985
 
Chapter 3 servlet & jsp
Jafar Nesargi
 
Listeners and filters in servlet
Shree M.L.Kakadiya MCA mahila college, Amreli
 
Java Servlet
Rajiv Gupta
 
Java Servlets
Nitin Pai
 
Servlet ppt by vikas jagtap
Vikas Jagtap
 
Servlets
ZainabNoorGul
 
Web Tech Java Servlet Update1
vikram singh
 
Servlet and servlet life cycle
Dhruvin Nakrani
 
Java Servlets
BG Java EE Course
 
java Servlet technology
Tanmoy Barman
 
Java servlet life cycle - methods ppt
kamal kotecha
 
Java Servlets & JSP
Manjunatha RK
 
Servlets
Geethu Mohan
 
java servlet and servlet programming
Kumar
 
Servlet.ppt
VMahesh5
 
Java Servlets
Emprovise
 
Servlet/JSP course chapter 1: Introduction to servlets
JavaEE Trainers
 
UNIT-3 Servlet
ssbd6985
 

Similar to Servlet api & servlet http package (20)

PPTX
Http Server Programming in JAVA - Handling http requests and responses
bharathiv53
 
PPTX
Servlet in java , java servlet , servlet servlet and CGI, API
PRIYADARSINISK
 
PPT
Module 4.pptModule 4.pptModule 4.pptModule 4.ppt
tahirnaquash2
 
PPT
Servlet.ppt
MouDhara1
 
PPT
Servlet.ppt
kstalin2
 
PPT
Servlet1.ppt
KhushalChoudhary14
 
PPT
Servlet (1) also contains code to create it.ppt
juhishrivastava25
 
PPTX
Java servlets
yuvarani p
 
PPT
Servlet123jkhuiyhkjkljioyudfrtsdrestfhgb
shubhangimalas1
 
PPTX
Servlets api overview
ramya marichamy
 
PPT
Servlets
Sasidhar Kothuru
 
PPT
Chap4 4 1
Hemo Chella
 
PPTX
Servlet
Priyanka Pradhan
 
PPTX
Servlets-UNIT3and introduction to servlet
RadhikaP41
 
PPTX
servlets sessions and cookies, jdbc connectivity
snehalatha790700
 
PDF
Java EE 01-Servlets and Containers
Fernando Gil
 
PDF
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
Tushar B Kute
 
PPT
Session 1 introduction servlet - Giáo trình Bách Khoa Aptech
MasterCode.vn
 
PPTX
WEB TECHNOLOGY Unit-3.pptx
karthiksmart21
 
PPTX
CS8651 IP Unit 3.pptx
Vigneshkumar Ponnusamy
 
Http Server Programming in JAVA - Handling http requests and responses
bharathiv53
 
Servlet in java , java servlet , servlet servlet and CGI, API
PRIYADARSINISK
 
Module 4.pptModule 4.pptModule 4.pptModule 4.ppt
tahirnaquash2
 
Servlet.ppt
MouDhara1
 
Servlet.ppt
kstalin2
 
Servlet1.ppt
KhushalChoudhary14
 
Servlet (1) also contains code to create it.ppt
juhishrivastava25
 
Java servlets
yuvarani p
 
Servlet123jkhuiyhkjkljioyudfrtsdrestfhgb
shubhangimalas1
 
Servlets api overview
ramya marichamy
 
Chap4 4 1
Hemo Chella
 
Servlets-UNIT3and introduction to servlet
RadhikaP41
 
servlets sessions and cookies, jdbc connectivity
snehalatha790700
 
Java EE 01-Servlets and Containers
Fernando Gil
 
Java Servlet Programming under Ubuntu Linux by Tushar B Kute
Tushar B Kute
 
Session 1 introduction servlet - Giáo trình Bách Khoa Aptech
MasterCode.vn
 
WEB TECHNOLOGY Unit-3.pptx
karthiksmart21
 
CS8651 IP Unit 3.pptx
Vigneshkumar Ponnusamy
 
Ad

More from renukarenuka9 (20)

PPTX
mobile computing
renukarenuka9
 
PPTX
Dip
renukarenuka9
 
PPTX
Compiler design
renukarenuka9
 
PPTX
Web programming
renukarenuka9
 
PPTX
Software engineering
renukarenuka9
 
PPTX
Software engineering
renukarenuka9
 
PPTX
Software engineering
renukarenuka9
 
PPTX
Bigdata
renukarenuka9
 
PPTX
Bigdata ppt
renukarenuka9
 
PPTX
Rdbms
renukarenuka9
 
PPTX
Rdbms
renukarenuka9
 
PPTX
operating system
renukarenuka9
 
PPTX
Rdbms
renukarenuka9
 
PPTX
OPERATING SYSTEM
renukarenuka9
 
PPTX
Data mining
renukarenuka9
 
PPTX
Computer network
renukarenuka9
 
PPTX
computer network
renukarenuka9
 
PPTX
operating system
renukarenuka9
 
PPTX
data mining
renukarenuka9
 
PPTX
COMPUTER NETWORK
renukarenuka9
 
mobile computing
renukarenuka9
 
Compiler design
renukarenuka9
 
Web programming
renukarenuka9
 
Software engineering
renukarenuka9
 
Software engineering
renukarenuka9
 
Software engineering
renukarenuka9
 
Bigdata
renukarenuka9
 
Bigdata ppt
renukarenuka9
 
operating system
renukarenuka9
 
OPERATING SYSTEM
renukarenuka9
 
Data mining
renukarenuka9
 
Computer network
renukarenuka9
 
computer network
renukarenuka9
 
operating system
renukarenuka9
 
data mining
renukarenuka9
 
COMPUTER NETWORK
renukarenuka9
 
Ad

Recently uploaded (20)

PDF
Preserving brand authenticity amid AI-driven misinformation: Sustaining consu...
Selcen Ozturkcan
 
PPTX
Systamatic Acquired Resistence (SAR).pptx
giriprasanthmuthuraj
 
PDF
Historical Knowledge Bases with Semantic MediaWiki
BernhardKrabina
 
PDF
The scientific heritage No 163 (163) (2025)
The scientific heritage
 
PPT
Supercapacitor materials For Material science
AnasBalghaith1
 
PDF
Asthamudi lake and its fisheries&importance .pdf
J. Bovas Joel BFSc
 
PDF
Plant growth promoting bacterial non symbiotic
psuvethapalani
 
PDF
20250603 Recycling 4.pdf . Rice flour, aluminium, hydrogen, paper, cardboard.
Sharon Liu
 
PDF
BlackBody Radiation experiment report.pdf
Ghadeer Shaabna
 
PDF
Pharmakon of algorithmic alchemy: Marketing in the age of AI
Selcen Ozturkcan
 
PDF
Calcium in a supernova remnant as a fingerprint of a sub-Chandrasekhar-mass e...
Sérgio Sacani
 
PDF
2025 Insilicogen Company English Brochure
Insilico Gen
 
DOCX
Critical Book Review (CBR) - "Hate Speech: Linguistic Perspectives"
Sahmiral Amri Rajagukguk
 
PDF
thesis dr Zahida and samia on plasma physics.pdf
HamzaKhalid267437
 
PDF
Global Congress on Forensic Science and Research
infoforensicscience2
 
PDF
Webinar: World's Smallest Pacemaker
Scintica Instrumentation
 
PPTX
CNS.pptx Central nervous system meninges ventricles of brain it's structure a...
Ashwini I Chuncha
 
DOCX
Paper - Suprasegmental Features (Makalah Presentasi)
Sahmiral Amri Rajagukguk
 
PDF
A High-Caliber View of the Bullet Cluster through JWST Strong and Weak Lensin...
Sérgio Sacani
 
PDF
A Classification of Metamorphic Rocks Canada12.pdf
ErturulKanmaz
 
Preserving brand authenticity amid AI-driven misinformation: Sustaining consu...
Selcen Ozturkcan
 
Systamatic Acquired Resistence (SAR).pptx
giriprasanthmuthuraj
 
Historical Knowledge Bases with Semantic MediaWiki
BernhardKrabina
 
The scientific heritage No 163 (163) (2025)
The scientific heritage
 
Supercapacitor materials For Material science
AnasBalghaith1
 
Asthamudi lake and its fisheries&importance .pdf
J. Bovas Joel BFSc
 
Plant growth promoting bacterial non symbiotic
psuvethapalani
 
20250603 Recycling 4.pdf . Rice flour, aluminium, hydrogen, paper, cardboard.
Sharon Liu
 
BlackBody Radiation experiment report.pdf
Ghadeer Shaabna
 
Pharmakon of algorithmic alchemy: Marketing in the age of AI
Selcen Ozturkcan
 
Calcium in a supernova remnant as a fingerprint of a sub-Chandrasekhar-mass e...
Sérgio Sacani
 
2025 Insilicogen Company English Brochure
Insilico Gen
 
Critical Book Review (CBR) - "Hate Speech: Linguistic Perspectives"
Sahmiral Amri Rajagukguk
 
thesis dr Zahida and samia on plasma physics.pdf
HamzaKhalid267437
 
Global Congress on Forensic Science and Research
infoforensicscience2
 
Webinar: World's Smallest Pacemaker
Scintica Instrumentation
 
CNS.pptx Central nervous system meninges ventricles of brain it's structure a...
Ashwini I Chuncha
 
Paper - Suprasegmental Features (Makalah Presentasi)
Sahmiral Amri Rajagukguk
 
A High-Caliber View of the Bullet Cluster through JWST Strong and Weak Lensin...
Sérgio Sacani
 
A Classification of Metamorphic Rocks Canada12.pdf
ErturulKanmaz
 

Servlet api & servlet http package

  • 1. Advanced java programming Servlet API & Servlet Http package By P.Abinaya
  • 3.  Two packages contain the classes and interfaces that are required to build servlets.  Then are javax.servlet and javax.servlet.http.  The Servelt API has been in a process of ongoing development and enhancement.  The current servlet specification is version 2.4.
  • 5.  The javax.servlet.http package contains a number of classes and interfaces that describe and define the contracts between a servlet class running under the HTTP protocol and the runtime environment provided for an instance of such a class by a conforming servlet container.
  • 6.  init()  Service()  Destroy()  That methods are the life cycle methods of servlet.  The getServletConfig() method is called by the servlet to obtain initialization parameter.
  • 7. HttpServletRequest Extends the ServletRequest interface to provide request information for HTTP servlets. HttpServletResponse Extends the ServletResponse interface to provide HTTP-specific functionality in sending a response.
  • 8. The javax.servlet.http package contains a number of interfaces and classes that are commonly used by servlet developers. That its functionality makes it easy to build servlets that work with HTTP requests and responses.
  • 9.  The HttpServletRequest Interface  Extends the ServletRequest interface to provide request information for HTTP servlets.  The HttpServletRequest Interface Extends the ServletResponse interface to provide HTTP-specific functionality in sending a response.
  • 10.  The Cookie class encapsulates a cookie.  A cookie is stored on a client and contains state information.  Some of the information that is saved for each cookie includes the following: o The name of the cookie. o The value of the cookie. o The expiration date of the cookie. o The domain and path of the cookie.
  • 11.  The HttpServlet class provides specialized methods that handle the various types of HTTP requests.  The methods are  doDelet()  DoGet()  doHead()  doOptions()  doPut()  doTrace().