Right click the mouse on created web project and select New -> Servlet from the menu.
ServletSession
\ServletSession\src
web
GetSession
GetSession
Select a class name, GetSession, and a package name, web, for the Servlet. After this press the Next Button.
GetSession
/GetSession
In this window, it is intended to set up deployment descriptor data for the Servlet.
Let the name and URL mapping be as proposed and press Finish button
You are now ready to change the servlet class to your needs.