Create Web Project
Next, I will explain how to create a Java 8 web project with Eclipse and Maven.
We will need to work with:
- Server Apache
To do this, go to the official website of Oracle and download Java SE Development Kit 8. You will need to have an Oracle account that you can create for free.
Choose the corresponding version, in my case it is the jdk-8u221-windows-x64.exe for 64-bit Windows.
Go to the official Eclipse page and download the Eclipse 2019-06R version or the latest version. In my case I have downloaded the 64 bit version.
When installing, you must choose the Eclipse IDE for Enterprise Java Developers.
Choose the installation directory. I have left the default directories.
From its official page, we will download Apache Tomcat 8. In my case I have chosen the 64-bit Windows zip version.
Once downloaded, unzip the zip file in an easily accessible place. In my case I have chosen D:apache-tomcat-8.5.43.
Creation of the project
Creation of the project:
Once you have run Eclipse, choose a workspace where you will save your project. In my case it will be D:eclipse2019-06-workspace.
Right-click on a blank area in the Project Explorer tab and choose New -> Dynamic Web Project.
Give the project a name and run Next twice.
Check the box Generate web.xml deployment descriptor and press Finish.
The project will be created.
Next, we will convert the project to a Maven project, in order to add future libraries that we need. To do this, right click on the project and choose Configure -> Convert to Maven Project. Presiona Finish.
Now the project becomes a Web project configured with Maven, where in the pom.xml file we can include the dependencies of the libraries that we need.
So far you have learned to install what is necessary to start developing your Java web application.
But this is not the end, since you will have to configure the environment. You can learn this in the following article Configure Web Project.