When using idea to build Maven entry project for learning, I encountered a puzzling error. I hereby record the following
The complete project structure should be as follows:
However, when Tomcat runs the project, it encounters index.jsp Page 404, very confused, but the project creation steps are not right, Tomcat runs well.
The reason is that the artifact path of Maven generated by ourselves is wrong, which leads to the failure to find the project (there is an elder brother on the Internet saying that idea uses its own Tomcat configuration by default, while we generally use our own Tomcat configuration).
terms of settlement:
First, open file > project structure:
Click artifacts. If not, you can add the following:
Integrity should be like this:
Click here to open Tomcat configuration:
If there are no artifacts, you can add them. If you have added them in the previous step, you can add them directly. Then you can do the following:
Run the project and finally Hello world!