One, create a Web project (the first to create the most troublesome)
1. Ensure the software is installed.
2. Double-click Open Software--Create a new project
3, Web project selection, first set up an empty project space to place your project, this is a difference
Equivalent to MyEclipse
4, the name of the establishment of the project
Equivalent to MyEclipse
5, click Fininsh, will pop up, ask you to build the project is shown on this page, or in the new page display, this look at your needs, here with the new page in order to follow my previous project distinction. (This is a difference)
6, this will pop up the settings, need to set up the use of the JDK, this is called the SDK
7, if not pop-up, you can use the settings such as Open
8. Set up my JDK here is 1.7
Equivalent to Myelipse settings such as location
9. Template settings
Choose
Set, build project type is a Web project, and then need to have XML document
Template naming
If this is the time to finish, you will find that a Web project style is generated, and you can find fewer things under the Web folder
Compare to MyEclipse (IntelliJ Web is the same as Myeclpse Webroot)
The main is less web-inf under the two folder, this is the Web project output folder, MyEclipse at the time of creation, automatically generated the two folders, but IntelliJ need to set their own later, this is a big difference between them two
IntelliJ less classes and Lib folder, need to be created and then set, and MyEclipse will be set at the time of establishment,
Red circle Position Auto Set
Figure three shows the location of the text folder where Web. Xml and Classes Belong
Now set the IntelliJ classes and Lib folders
Go to position
Go to position
Right-click New Folder (Classes and Lib)
Note: If an error is established here, wait until the item is OK, then delete
Like what
More than one lib under the classes.
Just ignore it for a moment.
10, classes and Lib output path settings
Select paths
Choose to use a template
To configure your own path
Up and down two to be consistent
11, set the path of the Lib output
Select the first one
Click OK, eject, select red Circle
Upon completion
You will find that the classes and LIB settings in the project are successful.
Just redundant set up a lib, here can be deleted except
I feel a little trouble with this design.
Such a Java Web project is built.
Second, configure the Tomcat server
1, the first installation, do not see the toolbar, you need to select the view below the option
2, will add a line, need to change the position of the circle
Dot open it. Select the red circle position
Select the plus sign to build your own Tomcat server
Choose
Change name
3. Associate your tomcat6.0
Open Configuration-> click the plus sign.
Associate Local
Attention:
The associated need is the JDK and Tomcat configured for the environment variable, otherwise the error will be started.
After the association succeeds
Set the open path after startup
Yes, the configuration was successful.
Click Start
Start without error,
Successful, the interface will pop up
In order to differentiate the interface we set
Popup interface
Port occupancy will occur here
Windows+r. command Window View port occupancy
Found that this 2256 takes up the port, shuts it down, and then it can run normally.
Ctrl+alt+del, start Task Manager
Find PID 2256 PID, turn it off, restart the server, there will be no problem.
Encoding exception
Set the code to UTF-8, and then put the transparent tick, will give the Chinese translation.
Thank you for your support, if you have any questions, please leave a message!!!
The most detailed IntelliJ Idea Project Web project build!!!!!!