Creating Servlet using MyEclipse IDE

Creating Servlet using MyEclipse IDE

In this article, I am going to discuss how to use Create Java Servlet Application using MyEclipse IDE. Please read our previous article where we discussed how to use Create Servlet Application using Eclipse IDE.

How to use Create Servlet Application using MyEclipse IDE?

MyEclipse is a commercially available Java EE IDE created and maintained by the company Genuitec, a founding member of the Eclipse Foundation. MyEclipse is built upon the Eclipse platform and integrates both proprietary and open source code into the development environment.

Download MyEclipse from https://www.genuitec.com/products/myeclipse/download/

Follow the below steps to create the servlet in the MyEclipse IDE:

  1. Create a web project.
  2. Create an HTML file.
  3. Create a servlet.
  4. Start the MyEclipse Tomcat server and deploy the project.
Step1: Create a web project

For creating a web project click on File Menu -> New -> Web project option from the Context menu as shown in the below image.

Create a web project

It will open the following “New Web Project” window. Here you need to give the Project name and other details and finally click on the Finish button as shown in the below image.

New Web Project

Once you click on the Finish button, it will create the Project for us,

Step2: Create the HTML file.

For creating an HTML file, right-click on the project -> New -> HTML which will open the following Create a new HTML Page window. Here you need to provide the HTML file name e.g. MyHtml.html and click on the Finish button as shown in the below image.

Creating Servlet using MyEclipse IDE

Once you click on the Finish button, an HTML file is created named MyHtml.html. Now open the MyHtml.html file and modified the code as shown below.

Servlet using MyEclipse IDE

Step3: Create the Servlet

For creating a servlet click on File Menu -> New -> servlet option as shown in the below image.

Servlet using MyEclipse

It will open the “Create a new Servlet” window as shown in the below image. Give a meaningful name to your servlet such as “Hello” and click on the Next button as shown in the below image.

Creating Java Servlet Application using MyEclipse IDE

Once you click on the Next button, it will open the following window. Here, you simply verify the details and click on the Finish button as shown in the below image.

Java Servlet Application using MyEclipse IDE

Once you click on the Finish button, a servlet file is created with the name Hello.java. Now let’s write the servlet code here.

Java Servlet Application using MyEclipse

Now change the welcome file as MyHtml.html in place of index.jsp.

how to use Create Servlet Application using MyEclipse IDE

Step4: Start the server and deploy the project

For starting the server and deploying the project in one step Right-click on your project -> Run As -> MyEclipse server application.

Start the server and deploy the project

You can see that the default page of your project is open, write your name -> go.

how to use Create Servlet Application using NetBeans IDE

Enter your name here and click “go”.

Create Servlet Application using NetBeans IDE

In the next article, I am going to discuss how to use Create Servlet Application using NetBeans IDE. Here, in this article, I try to explain how to use Create Servlet Application using MyEclipse IDE. I hope you enjoy this Create Servlet Application using MyEclipse IDE article.

Leave a Reply

Your email address will not be published.