Create a MAVEN Web project
1: First open idea, click "Create New Project" in the left column to find Maven, on the right side of "create from archetype" hook, according to the template to create the project,
note When selecting a template, be sure to select the WebApp project under Org.apache.maven.archetype. &NBSP,
Click Next after
enter GroupID and Artifactid here and click Next
Choose your own configured maven settings.xml and Respository,maven warehouse must be well-equipped, otherwise the creation of the project will fail, you can use Ali's warehouse. Click Next Next
here's the finish. Creating a Maven Project
2 Project Deployment
after the MAVEN project is created, idea will begin to download the dependencies required by MAVEN, which will require a good network to successfully complete the creation. When the project is successfully created, the structure is as follows:
Now you need to configure the project, click on Project structure (the bottom fourth icon in the top column) and click on the box below to pop up.
Select Facts First, click "+", find the Web, click on the popup, select the module we just created, click OK
we have created a Web module, where we need to modify the path in deployment descriptors, click the Small Pencil button, and change its path to Web. XML in our project. After the change, we need to change the Web resource directories to the WebApp folder of our project.
after the change of effect such as:
Click Apply, select the left column artifacts to configure, click +, select Web application:exploded, choose Form Modules, select our Web project, click OK after
Click Apply and click OK to complete the configuration of the Web project.
below we deploy the Web project to the Tomcat server, first find the edit under the Run menu
configurations, click and select + to find the Tomcat server.
name can be filled according to your preferences, the first time you use the Tomcat server classmate needs to configure Application server, choose the path of the Tomcat server under our computer. Then click Deployment, select +,arifacts, deploy the artifacts we configured earlier into Tomcat, and we can configure the path of the project in the application context. Then click Apply,ok to complete the Tomcat server configuration.
then we can run it and see if the deployment is successful. Click on the Crawler-like button debug, you can see the Tomcat server is starting up, if the Tomcat server is not a problem can be successfully started.
this will automatically jump to the browser side, and we can see that our Web project was successfully deployed to the Tomcat server.
articles reproduced!!
Idea to create a MAVEN Web project