Introduction
This is an article as a continuation from several previous articles before. In this article, the focus is about how to create a maven-based web application in NetBeans IDE. It is a simple web application where the build process is using maven tool. Check the article exist in this link to configure maven in NetBeans IDE. After the build process of the web application is a success, it will then continue on to the deployment process. The web application will be deployed in Wildfly Application Server.
So, in order to use Wildfly Application Server to run the web application, configure it first in NetBeans IDE. Read the article with the title of ‘How to Configure Wildfly Application Server for NetBeans IDE in Windows 10 from Tool > Server’ in this link to be able to do that. Also another similar article for configuring Wildfly Application Server with the title of ‘How to Configure Wildfly Application Server for NetBeans IDE in Windows 10 from Windows > Services’ in this link.
How to Create maven-based Web Application in NetBeans IDE
-
First of all, just run the NetBeans IDE.
-
After the NetBeans IDE appear, just access the menu in File > New Project… as in the following appearance :
-
Upon clicking the New Project… menu, the following window configuration display for creating a new project or a new application will appear :
-
Just click the Next > button, it will continue and redirect the process for creating the web application using maven as its builder in the following appearance :
Actually, for the attribute of the project, just choose the project name, project location, group id and also version. Change it accordingly but in term of the package entry, it is optional as it informed above. After that, just click the Next > button to continue the process.
-
After clicking the Next > button in the previous step above, the following display of window configuration to create the maven-based web application will appear :
Since in the previous configuration article, it is using Wilfly Application Server as the application server to run the application, just select it as in the above image. Also, use the newest version of the Java EE which is Java EE 8 Web. Actually, there is also another newer version of Java EE which is recently available with a new name of Jakarta EE 8 Web. But in this context, Java EE 8 Web is chosen as the Java EE version. Do not forgt to click the Finish button to end the process of creating the maven-based web application. The following is log appearing in the output tab informing the process for creating the web application :
-
If the process for creating a new web application is a success, the following info in the output tab will appear :
Last but not least, just run the project by selecting the project, right click on it and select Run. If there are no further error appear, it will run the main index page in the web browser as follows :
10 thoughts on “How to Create maven-based Web Application in NetBeans IDE”