Intellij Idea Direct installation (can choose their own set of installation directory according to need), JDK use 1.6/1.7/1.8 can, mainly configure the system environment variables, TOMCAT7 on the Tomcat's official website download compressed package decompression.
First, create a simple Web project
1. Create a Web project
Select Project SDK for 1.6 (if no SDK is configured first), File--New project, Next
Create Project from template page, uncheck any options, Next
Enter project name: Webdemo, Next, Finish
Second, create a module
Right-click the project name Webdemo in the mouse point select New, select Module---module SDK selection 1.6, tick the Web application (3.1) under Java EE, Note that the version corresponds to 3.1 under the window, and that create Web. XML is checked and next
Input module name is Firstweb, Finish
3. Create a good Web project
4. Create two folders under the Web/web_inf directory: Classes and Lib
Classes is used to store the compiled output class file, Lib is used to store the third-party jar package
5. Configure Folder path
File--Project Structure (CTRL + SHIFT + ALT + s) or use the toolbar's shortcut, select modules
Select paths, select "Use module compile out path" to set the OutputPath and test output path to the classes folder you just created
Select the dependencies of the current window, and select "1 JARS or directories ..." by selecting the module SDK as 1.6, click on the + sign on the right.
, select the Lib folder you just created, OK
Select Jar Directory, OK
, Apply, OK
Iii. Configuring the Tomcat container
Open Menu Run---Edit configurations ...
Click "+", select "Tomcat Server", select "Local"
In name, enter a new server name, click "Configure ..." after "Application Server", pop up the Application Servers window, select the locally installed Tomcat directory in Tomcat Home, OK
In the "Run/debug Configurations" window, enter the name of the server TOMCAT7, in the "Server" panel, uncheck "After Launch", set "HTTP port" and "JMX port" (default), click Apply---OK, this is the Tomcat configuration (the small Red fork on the Tomcat icon in the list on the left is a hint that the item is not deployed and will disappear when the project is deployed).
Iv. deploy and run the project on Tomcat
After you have created Tomcat, you can quickly open the Tomcat configuration page from the toolbar:
You can also use the menu bar: Run, Edit configurations ..., select the tomcat7 you just created, select deployment, click the "+" sign on the right, and select Artifact
Select Web project, application context can be filled with "/firstweb" (You can also not fill in), Apply
Go back to the server panel, change the on ' Update ' action and the on Frame deactivation (these two options are only available after Tomcat has configured the project) to update classes and resources, apply
Develop Web projects and run Tomcat view effects
1. Edit Index.jsp Page
2. Running Tomcat
Intellij idea 2017 Create Web project and Tomcat deployment combat