What is servlet
- how to use servlet in java
- how to work servlet in java
- what is servlet in java with example
- what is servlet in simple terms
Java servlet tutorial
Servlet life cycle.
Starting with first Servlet Application
To get started with Servlets, let’s first start with a simple Servlet application i.eLifeCycle application, that will demonstrate the implementation of the init(), service() and destroy() methods.
First of all it is important to understand that if we are developing any Servlet application, it will handle some client’s request so, whenever we talk about Servlets we need to develop a index.html page (can be any other name also) which will request a particular Servlet to handle the request made by the client (in this case index.html page).
To be simple, lets first describe the steps to develop the LifeCycle application :
- Creating the index.html page
- Creating the LifeCycle Servlet
- Creating deployment descriptor
Creating the index.html page
For the sake of simplicity, this page will just have a button invoke life cycle.
When you will click this button it will call LifeCycleServlet (which is mapped according to the entry in web.xml file).
HTML
The name of the Servlet is given i
- what is servlet and how it works
- what is servlet in java