Create project for web application in Eclipse

I have a tutorial on creating a web application using Maven in Eclipse. This tutorial, I will show you how to create a project for web application in Eclipse that does not support Maven.

First, in Eclipse, go to File, select New, then Project … a new window will be displayed.

In this window, select Dynamic Web Project as follows:

Create project for web application in Eclipse

then click the Next button.

Create project for web application in Eclipse

In the window above, enter the Project name.

The Target runtime is the place we configure the web container we want to run for our application in Eclipse. You can configure this section for now or later.

The dynamic web module version allows us to choose the Java Servlet version. Just select the latest version of Java Servlet.

The rest you can leave the default values.

Here, I will configure as follows:

Create project for web application in Eclipse

Click Next button.

Create project for web application in Eclipse

Click Next button.

Create project for web application in Eclipse

At this point, you press the Finish button to finish creating the web application in Eclipse.

Result:

Create project for web application in Eclipse

To run this project, you can right click on the project and select Run As, then select Run on Server:

Create project for web application in Eclipse

Select the server you have installed in Eclipse, as follows:

Create project for web application in Eclipse

Click Next button.

Create project for web application in Eclipse

As you can see, our application has been configured to run with the server.

Click Finish to run our server.

Because there is no default Servlet declared in our application, you will see the following result:

Create project for web application in Eclipse

 

Đánh giá bài viết
Chia sẽ bài viết này ...Share on Facebook
Facebook
0Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin

Add Comment