I'm just a porter of knowledge.
System environment: MAC Pro OS 10.11.5
Development environment: Java, IntelliJ idea, Tomcat, MYSQL
(yes, I gave up MongoDB, fell!) Do not know how to connect the database, I heard to use Maven, one to learn too much, time tight task heavy, I still return to familiar environment, ah, IntelliJ idea not familiar?? )
Everything is in the know.
This article is divided into three parts:
1. Create a Web project
2. Connect to the Tomcat server
3, MySQL installation (there is a big pit, almost killed)
Create a Web project
1, file-->new a project or module, the new project will occupy a window alone, new module, it is in this window new, familiar with the Android studio students should be familiar with.
2, select the Web application, the bottom three is the use of the framework, if the use of the framework, click on the check box.
3, fill in the project name, click Finish, a project has been built.
4, however, this is not the end, and some things need to be set.
Web-inf folder, create a new two folder classes and Lib, which is used to store the compiled files, which is used to store the jar package.
Then File-->project structure--> Select Modules, the following interface appears.
Select the second card to set the file directory. Such as:
Select the third card, set the storage location of the jar package, and select the new Lib folder you just created. Such as:
IntelliJ Idea Tool use-create Web project