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

7 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 http://www.itsoftpoint.com/?page_id=2425


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

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.













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


Post a Comment

Popular Posts

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