Servlet Tutorial
load on startup
The load-on-startup element of web-app loads the servlet at the time of deployment or server start if value is positive. It is also known as…
welcome-file-list
The welcome-file-list element of web-app, is used to define a list of welcome files. Its sub element is welcome-file that is used to define the…
How Servlet works?
It is important to learn how servlet works for understanding the servlet well. Here, we are going to get the internal detail about the first…
Servlet example
There are given 6 steps to create a servlet example. These steps are required for all the servers. The servlet example can be created by…
Servlet Life Cycle
The web container maintains the life cycle of a servlet instance. Let’s see the life cycle of the servlet: Servlet class is loaded. Servlet instance…
HttpServlet
The HttpServlet class extends the GenericServlet class and implements Serializable interface. It provides http specific methods such as doGet, doPost, doHead, doTrace etc. Methods of…
GenericServlet
GenericServlet class implements Servlet, ServletConfig and Serializable interfaces. It provides the implementaion of all the methods of these interfaces except the service method. GenericServlet class…
Servlet Interface
Servlet interface provides common behaviour to all the servlets. Servlet interface needs to be implemented for creating any servlet (either directly or indirectly). It provides…
Servlet API
The javax.servlet and javax.servlet.http packages represent interfaces and classes for servlet api. The javax.servlet package contains many interfaces and classes that are used by the…