Back to Top

Monday, 20 February 2012

J2EE: SERVLET: SERVLET API


   Java Servlet API is that Application Program Interface (API), which defines and describes the contracts between servlets and servers. That means, it contains the set of programs and standard instructions to develop a proper access between a servlet and the server. Servlet API is a part of the official J2EE API. This API contains 2 packages with the extension javax. They are as follows.

·        Package javax.servlet
·        Package javax.servlet.http

Package javax.servlet:

  • Package javax.servlet deals with the contracts between a servlet class and the runtime environment offered for an instance of the class, within the servlet container.

  • It contains a set of classes and interfaces. Some important classes and interfaces like, Class GenericServlet which implements Interface Servlet. Apart from that, interfaces like Filter, RequestDispatcher, ServletRequest, ServletResponse, etc. and classes like ServletInputStream, ServletOutputStream, etc are also belong of this package. It also contains 2 exceptions, and they are ServletException and UnavailableException.

Package javax.servlet.http:

  • Package javax.servlet.http deals with the contracts between a servlet class, which is running under HTTP protocol and the runtime environment offered for an instance of the class, within the servlet container.

  • It also contains some important classes and interfaces. Some of them are, Interfaces like HttpSession, HttpServletResponse, HttpServletRequest, HttpSessionBindingListener, etc and classes like Cookie, HttpServlet (which implements Interface Servlet of javax.servlet package), etc.

Uses of Servlet API:
  1. Management of Servlet life cycle.
  2. It provides access to servlet context.
  3. It also provides some utility classes.
  4. And last but not least, it also provides classes to handle HTTP protocol.
Anijit Sarkar

10 Responses to “ J2EE: SERVLET: SERVLET API ”

jaylen watkins said...
12 March 2012 at 15:38

Well experience J2ee stuff. Thanks for this.

Interview Questions


Unknown said...
31 October 2014 at 17:57

HI, Friends this very usefull java servlet interview questions
for excellent knowledge on java servlet visit http://www.itsoftpoint.com/?page_id=2425


Unknown said...
1 July 2017 at 17:56

I have seen lot blogs and Information on othersites But in this Java Blog Information is very useful thanks for sharing it........


Unknown said...
5 October 2017 at 12:50

Thankyou for the information I was handling many java projects As I am a PMP Certified Expert where my PMP Course in Mumbai had a great impact on me with different set of elements Well thankyou for the blog Keep Updating.


Unknown said...
9 February 2018 at 18:22

Webtrackker Technology

Webtrackker Technology is an IT company which is providing the Webtrackker Technology - Webtrackker is IT company which is providing the Mean stack, mobile apps,

website development service in India, uk, usa, kanada, new zealand Etc.


Webtrackker , Webtrackker
Webtrackker, Webtrackker, Webtrackker , Webtrackker , Webtrackker review, Webtrackker

review
, Webtrackker review, vermeer, Webtrackker

reviews
, Webtrackker review, Webtrackker

review
, Webtrackker Technology, Webtrackker Technology, Webtrackker Technology, Webtrackker Technology, Webtrackker Technology, Webtrackker Technology, Webtrackker, Webtrackker Technology, Webtrackker Reviews.













subha said...
17 June 2020 at 11:26

Your good knowledge and kindness in playing with all the pieces were
very useful. I don’t know what I would have done if I had not
encountered such a step like this. very good jobs.
Ai & Artificial Intelligence Course in Chennai
PHP Training in Chennai
Ethical Hacking Course in Chennai Blue Prism Training in Chennai
UiPath Training in Chennai


360digitmg said...
7 November 2020 at 15:52

I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts.
Best Digital Marketing Courses in Hyderabad


saikumar0801 said...
15 April 2023 at 16:19

This Blog is Nice!

Python full stack Job Oriented Training in Hyderabad


vcube said...
21 July 2023 at 12:29

Thanks for sharing the blog
Python fullstack course in Hyderabad


mj said...
24 October 2024 at 17:37

insightful and very important blog, thankyou
Data science Courses in Manchester


Post a Comment

Popular Posts

All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar