Home » Eclipse

Servlet file in Eclipse Mars



In this article, we will look upon how to create Servlet file step by step in eclipse mars 2?
Submitted by Manu Jemini, on February 28, 2018

The Eclipse IDE is very popular and used to make a wide range of projects. The Servlet classes are the building blocks for any dynamic web project. Servlet are views in dynamic web project.

To create a servlet, we have to follow these 4 simple steps. First open or create a new JAVA or any other Java related project in eclipse IDE. Go to your project folder or package and right click on the folder and hover on new option and click on servlet. Now a new window will open and fill the name of the class and click on the next button. Now you don’t have to worry about the next interface, this is just some advance configuration, skip it and click Finish. You should also choose if you want to have doPost or doGet or anything else. Automatically, servlet you have created will open up and you will have your own class file.

Here are the steps to create Servlet file in Eclipse,

1) Right click on the package or project

Servlet file in Eclipse Mars 1

2) Hover on new option and click on the Servlet

Servlet file in Eclipse Mars 2

3) Fill the corresponding Servlet name

Servlet file in Eclipse Mars 3

4) Choose if you wanted to have doGet or doPost or both

Servlet file in Eclipse Mars 4

5) Here you have your class open it in the explorer

Servlet file in Eclipse Mars 5

Now you are ready to work on your Servlet in eclipse.






Was this page helpful? YES NO

Are you a blogger? Join our Blogging forum.



Comments and Discussions





© https://www.includehelp.com (2015-2018), Some rights reserved.




Like other websites, this site uses cookies to deliver relevant ads based on your interest, by using our website, you acknowledge that you have read our privacy policy.
Close