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.



Comments and Discussions



Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© some rights reserved.