Back to Top

Monday, 20 February 2012


   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

13 Responses to “ J2EE: SERVLET: SERVLET API ”

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

Well experience J2ee stuff. Thanks for this.

Interview Questions

nasir husain said...
31 October 2014 at 17:57

HI, Friends this very usefull java servlet interview questions
for excellent knowledge on java servlet visit

Naviya Nair said...
24 October 2016 at 15:25

I have read your blog its very attractive and impressive. I like it your blog.

Java Training in Chennai Java Training in Chennai | Core Java Training in Chennai

Online Java Training Java 8 Online Training | Java J2EE Online Training | JavaEE Training Institute in Chennai Java Training Institutes

Java Training Institutes in Chennai Java Training in Chennai

Vamshi Krishna 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........

venu puram 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.

mohit kumar 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

, Webtrackker review, vermeer, Webtrackker

, Webtrackker review, Webtrackker

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

CIIT Noida said...
23 April 2018 at 17:11

CIIT Noida provides Best MCA Courses in Noida based on the current

IT industry standards that help students to get high paying jobs in Top MNCs. CIIT provides Best MCA Training in Noida, Greater Noida, and Ghaziabad.

CIIT is one of the trusted MCA training institutes in Noida providing practical knowledge and 100% job assistance with basic as well as advanced

level MCA subjects. CIITN is the best MCA college in Noida, greater noida, ghaziabad, delhi, gurgaon regoin.

At CIIT MCA classes in Noida is conducted by subject experts corporate professionals with 9+ years of experience in managing real-time and live

projects. Sofracle Nano Specialized MCA classes Noida is the perfect blend of academic learning and practical sessions to provide maximum exposure to

students that transform an average student into a corporate professional whom companies prefer to hire.

Best MCA College in Noida

Riya karakoti said...
27 July 2018 at 11:52

Really a good post, thanks for sharing .keep it up.

Best Web Design Training Institutes in Noida

Best Hadoop Training Institutes In Noida

Best Digital Marketing Training Institute in Noida

Sap Training Institute in Noida

Best Java Training Institute in Noida

SAP SD Training Institute in Noida

Best Auto CAD Training Institute In Noida

aashutosh webtrackker said...
31 July 2018 at 19:09

Salesforce Training Institute in Noida

Salesforce Training in noida

Best Salesforce Training Institutes in Noida

Best Aws Training Institutes in Noida

best aws training in noida

aws training institute in noida

best data science training institute in delhi

python Training Institute in noida

sas Training Institute in noida

linux Training Institute in noida

Arvind Rawat said...
10 August 2018 at 11:57

Each department of CAD have specific programmes which, while completed could provide you with a recognisable qualification that could assist you get a job in anything design enterprise which you would really like.

AutoCAD training in Noida

AutoCAD training institute in Noida

Best AutoCAD training institute in Noida

amarraj paindit said...
13 September 2018 at 10:57

rpa training institute in noida
sas training institute in noida
hadoop training institute in noida
blokchain traninig institute noida

Robotic Process Automation Tutorial said...
27 October 2018 at 17:13

Very interesting blog.Thanks for sharing this much valuable information.Keep Rocking.
rpa training in chennai | rpa course fee in chennai | trending technologies list 2018

Aman CSE said...
4 November 2018 at 12:26

Thanks For sharing such a wonderful Blog on RPA. This blog contains so much of data about RPA that anyone who is searching for RPA, its really helpful for them to grab this data from your blog on RPA. Again thank you so much for your blog on RPA.
Thanks and Regards,
blue prism training in chennai
Best blue prism training in chennai
blue prism training cost in chennai

Post a Comment

Popular Posts

All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar
blog links Web Directory Academics Blogs