What is Java Servlet

What is Java Servlet?

A servlet is a Java technology-based Web component answer to CGI programming, managed by a container that generates dynamic content. CGI was widely used for generating dynamic content before Servlets arrived. They were programs written mostly in C, and C++ that run on a web server and were used to build web pages.

Like other Java technology-based components, servlets are platform-independent Java classes that are compiled to platform-neutral byte code that can be loaded dynamically into and run by a Java technology-enabled Web server. Containers, sometimes called servlet engines, are our Web server extensions that provide servlet functionality. 
Servlets interact with Web clients via a request/response paradigm implemented by the servlet container.

As you can see in the figure below, a client sends a request to a web server, and the server forwards that request to a servlet, servlet generates dynamic content, mostly in the form of HTML pages, and returns it back to the server, which sends it back to the client. Hence, we can say that the servlet is extending the functionality of the web server (The job of the earlier servers was to respond only to requests, by maybe sending the required HTML file back to the client, and generally no processing was performed on the server)


 Related Topics:

What is Java Servlet Life Cycle and how to explain it
What is Servlet Class Hierarchy
What are Java Servlet's different HTTP Request Handling Methods

13 Comments

Please enter relevant questions and information.

  1. Amazing explanation.i understand it in better way through this post.thankyou for shareing.
    professional-web-design-company

    ReplyDelete
  2. Searching for Mobile app Development Company in Delhi? 3sstudio is the Best mobile app development Company in Delhi Specializing in android & IOS app development Services, with more than 1000+ Satisfied Clients.

    contact us on :+91 9811241103

    ReplyDelete
  3. A big shout out to you, such a useful and thought provoking article on Web Design USA straight from an intellectual mind

    ReplyDelete
  4. Thank you so much for sharing this vital information with us. This is fantastic.Custom Website Development

    ReplyDelete
  5. I really appreciate what you're doing, my friend; it's fantastic.
    Custom Web Development

    ReplyDelete
  6. Enjoyed reading the article above , really explains everything in detail, the article is very interesting and effective. Thank you and good luck in the upcoming articles.
    Custom Website Development

    ReplyDelete

  7. I seriously don't have enough words to thank you.
    SEO company

    ReplyDelete
  8. I adore your work, and it greatly motivates me.
    Cheap SEO New York

    ReplyDelete
  9. This is an excellent article. Your essay is very easy to understand. Thank you for providing us with this useful information.
    Custom Website

    ReplyDelete
Previous Post Next Post