Servlets Tutorials

A conversation between server and a client is called session. This conversation consists of series of request and responses. The HTTP is a stateless protocol, so the server cannot identify from which client it is getting requests when there is s series of continuous request and response from a same client to a server. If […]

In any J2EE web applications servlets are an integral part. The server side component of a servlets gives a powerful mechanism for developing server side web applications. It provides an important role in the explosion of Internet, its reusability, performance and scalability. Web developers can create fast and efficient server side programs or applications by […]

Cookies are set of textual information’s and Web server send these information’s to the browser and the browser keep these information remains constant when calling the same Web site or domain later. There are several advantages for keeping cookies. Recognize a user during an e-commerce session Strike down username and password Customize the site Focus […]

Finalizing a servlet means that, we are calling the destroy () method. The destroy () method helps to remove the servlet from the service. We are calling the destroy () method of the Servlet interface, when a servlet container wants to remove the servelt from the service. That is a container needs to recover memory […]

Web components can bring up other Web resources in two ways:- Indirect. Direct. Indirect Method In the indirect method web component can be  invokes another Web resource when it embeds in content returned to a client a URL that points to another Web component. In the Bookstore (this examples share common classes and a database […]

A filter is helped to transform the header or content or both of a request or response. A filter is an object. Actually, filters don’t create a response; they are pre-processors of the request before it reaches a servlet, and/or post processors of the response leaving a servlet. The web components in that they usually […]

The servlet life cycle is controlled by containers.The container perform the following activities, when a request is happened in a servlet. 1.If  the servlet instance does not exist, the Web container Loads the servlet class. The servlet class creates an instance. Initializes the servlet instances by calling the init () method. 2.Invokes the service () […]

Servlets are server side components and it’s a powerful mechanism for developing the server-side programs. Servlets is a component-based, the platform-independent methods for building Web-based applications without the performance limitations of CGI programs. By using servlets web developers can make server-side applications quickly and efficiently it can run on any servlet-enabled Web server. Servlets  can […]

Collection of frequently asked interview questions from Servlet. How can we create a Servelt? A Servlet can be created by extending the httpServlet or GenericServlet classes. Explaing what you mean by servlets? Servlets are server side components that provide a powerful mechanism for developing server side programs. Servlets provide component-based, platform-independent methods for building Web-based […]

Servlets are pieces of Java source code that add functionality to a web server in a manner similar to the way applets add functionality to a browser. Servlets are designed to support a request/response computing model that is commonly used in web servers. In a request/response model, a client sends a request message to a […]