Skip to main content

Posts

Showing posts with the label Java Servlet

Life-Cycle of Servlet - Java J2EE

What Is the Life-Cycle of Servlet? A Servlet life-cycle can be defined as the entire process from its creation till the destruction. The Stages of the Servlet Life Cycle : 1.        Servlet is loaded 2.        Servlet is instantiated 3.        Servlet is initialized 4.        Service the request 5.        Servlet is destroyed Source - (http://www.javachain.com/servlet-life-cycle/) For more questions on servlet programming...

25 Best Servlet Interview Questions and Answers - Java J2EE

What Is Servlet? Java Servlet is a server side programming which used to generating dynamic web pages and it also generates web page as a response of the request received from browsers. Java Servlet is a class which responds to a particular type of network request - HTTP request. All servlets must implement the javax.servlet.Servlet interface which defines servlet life-cycle methods . Java Servlet  are programs that run on a Web server and it work in the middle layer between a request coming from the Web browsers and databases on the HTTP server . How Many Objects of a Servlet is created? Only one object at the time of first request by servlet or web container. Web container manages the life cycle of a servlet and helps to map the URL to a specific servlet and web container creates the object of a servlet. Do we override service () method? No!, we do not override the service() method. What's New Features Added to Servlet 3? The main aims to of...