1. Basic Configuration
1.1 Installing JDK1.7, configuring System variables: Java_home and Path
1.2 Installing TOMCAT 7.0
1.3 maven uses IntelliJ idea's own maven, version v3.0.5
2. Create a MAVEN Web project
2.1 File new Module Maven Select SDK Tick "Create from archetype" Select template "webapp" Next
2.2 Fill in the project's MAVEN coordinates Next
2.3 Enter the project name storage path "Finish"
2.4 Using MAVEN auto-import, there is a small window in the top right corner of idea, click "Enable auto-import" and wait a moment.
2.5 After successful import, the project structure is as follows
2.6 Setting the project Structure File project Structure
Project settings, keeping the default
Modules settings, select the project "Hello-project" "Sources" tab "right-click" "Main", New folder, named "Java", click Mark as "Sources", mark the text Folder "Java" for source code folders
Modules settings, select the project "Hello-project" "Paths" tab set the output directory to remain the default
Modules settings, select the item "Hello-project" "Dependencies" tab, click the plus "+" on the right
Select "2 Library"
Check Tomcat 7.0 Add Selected
Finally click "OK"
2.7 Configuring Tomcat
Run "Edit Configurations" plus "+" "Tomcat Server" "Local"
Enter a name
Set deployment, Deployment tab, plus "+" Artifact
Check Hello-project:war exploded "OK
Set the name of the application context and click "OK" to complete the Tomcat configuration
2.8 Publish the project, click the green arrow in the toolbar or the green arrow in "Application Servers" below to launch the TOMECAT deployed project.
When the project starts, it automatically opens the browser and jumps to the first page of the project, the default home page is index.jsp
This completes the MAVEN Web project creation, project configuration, tomcat configuration, and project release process.
Reference:
http://geeksun.iteye.com/blog/2179658
Http://www.cnblogs.com/kmpp/p/create_maven_web_app_via_intellij_idea.html
Getting Started with Java web (i) Creating a Maven Web project using Intellij idea 14.1.5