Eclipse Neon Chinese version;
1. Right click New--Select Dynamic Web Project
2: Fill in the project name Project location; Select Dynamic Web Module version and Tomcat version; Click Finish to create the project;
2.1: Project name;
2.2: Project location;
There is a matching relationship between 2.3:dynamic Web Module version and Tomacat version: matching relationships such as
3: Create the project structure after successful:
4: Look at the properties of the project after creating the project structure:
4.1: View the path to the project (here is what path is the path?). Guess.); The location of the project (where is the position? guess); Project code: UTF-8;
4.2 View project Facets: (Found in the red box in the version of it? Guess what they have to do with what?)
4.3 Project deployment: Web Deployment Assembly (Web Deployment integration) This is primarily the configuration of the Web deployment directory; (What does this deployment directory affect?) Guess!)
4.4 Java Compiler: This will cause your project to compile if it is inconsistent with the JDK version you set.
4.5 Java Build Path: (Guess what the build path means?) guess what it's going to affect? If you can not guess, click on the arrows to indicate the Add folder, open the directory structure after opening, I believe you will understand);
This is the 4th step that needs to know what the above properties mean. This will make it easier to understand the entire project structure, and if you have 404 and so on after startup, your answer may be in one of these configurations;
5: Create a new page under the WebContent directory index.jsp (that is, with Web-info is the same directory level) (note: The location must be in the WebContent directory to guess why?)
Index.jsp the name can be casually up;
Enter HelloWorld inside the index.jsp!
The directory structure at this time:
6: Deploy the Web project to run:
6.1 Select Server my is Tomcat 9
7 Click Finish to run:
At this point the console information: Indicates that Tomcat has started to complete.
8: Browser address bar input address: localhost:8080/web02/(note: The address here only to the project address, no write page address, also can access, guess why?) if you add a welcome.jsp page, you can also directly enter the project address Did you ask index.jsp? You can try it yourself. And then guess why?
Hello world has been shown on the page!
Congratulations on successfully creating a simple Web page.
Create a simple Web project with Eclipse