Back to Top

Monday, 27 February 2012

J2EE: SERVLET: What is Servlet?


Servlet:

Servlet is a server-side (runs within a Web server), Java Programming Language Class which interacts with clients via request-response programming model (example, HTTP Request-Response model).

It can respond to any type of request, but, generally, it is used to extend the application hosted by Web Server by providing dynamic web content.

It has build-in threading capability and provides a secure environment for programming.


Java Servlet API provides javax.servlet and javax.servlet.http packages offer necessary classes and interfaces for writing servlets. All Servlets must implement Interface Servlet, which contains the servlet life-cycle methods.

To implement a generic service we can extend Class GenericServlet, which defines a generic, protocol-independent servlet. And to write an HTTP servlet for use on the Web, we can extend Class HttpServlet, which provides methods, such as doGet() and doPost(), for handling HTTP-specific services.
Anijit Sarkar

201 Responses to “ J2EE: SERVLET: What is Servlet? ”

«Oldest   ‹Older   201 – 201 of 201   Newer›   Newest»
Sanjana said...
11 November 2025 at 10:40

Thanks for sharing such a informative blog!
VISA Management Courses in Delhi


«Oldest ‹Older   201 – 201 of 201   Newer› Newest»

Post a Comment

Popular Posts

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