In the process of learning Ajax, but also with IntelliJ is a bit old, this is after a eclipse, found that the configuration is also a headache, now called you how to create a Web project, but also let you configure Eclipse.
First, create a Web project
1. Open "File"-"New"-Select Dynamic Web Project and click Next.
2, the Project Setup window appears, set the name of the project ( corresponding to the project name ) and Dynamic Web Module version (version), we use the latest version, tomacat8 corresponding to the 3.1,tomacat corresponds to 3).
3, click Next, specify the Java file compilation path (put in webroot\web-inf\classes),
4, click Next, you can set the Web project root directory (that is, the deployment path, generally set to Webroot),
5, if you need to change in the project to create some of the settings, you can right click on the project directory, in the pop-up menu, select the Properties option, in the Popup Settings dialog box, you can set the Web project root directory (that is, the deployment path, generally set to Webroot), and the Dynamic web Settings for module version:
6. Right-click the project directory and select Build Path-configure build Path. Options, pop-up box
In the popup dialog box, delete all the class libraries
Second, add the deployment environment, this article is Tomacat, as follows:
1), Tomacat installation and configuration course
2), open service view, action:
Under
The next dialog box that appears is:
The next step is to select the appropriate catalina-home (Tomacat installation path)
Then complete the deployment of the Web project's Tomacat server. After Tomacat Server, you can start Tomacat and run the program.
3), set the parameters of the Tomacat (double-click Tomacat v8.0 Server in the bottom server) operation
4,) According to set TOMACAT configuration, respectively set up Jre,server Runtime (English set deployment, that is, bundle weapons such as tomacat in the environment of the jar package, such as Servlet.jar, etc.), the Web App Library libraries (for the project under the Lib directory of the Jar package, set up this, you can dynamically add to the project Webroot/web-inf/lib dynamic in the jar package), the setup process is as follows:
Third, set up JDK
1), click Add Liberary. button, select the JRE System Library in the popup dialog box, click
Select the alternate JRE in the popup dialog box, click the Intalled jres button to set the JDK for the project run,
In the popup dialog box, select Add: Button
Above is the path to your JDK installation.
Click Funish, and then select the JDK you just added:
Click "OK" to set up the JRE, then go back to the homepage, Project properties page, add Web App Libraries,
Iv. Final effect:
This time, when you are adding class Yes, you will introduce a Java package,
That's OK!
Eclipse creates Java Web Engineering configuration tomato and JDK