[Solved] Tomcat runs JavaWeb servlet Error 404

Problem description

A new server template project is built with idea. After Tomcat is configured, the access report 404

is accessed

reason

Tomcat cannot load message 404 because war is not loaded

Solution:

An error occurs because the war artifact of this project is not loaded. You need to import this project as a artifact

and then select war_ Compared with war, the structure of the artifact will be consistent with the source directory for easy development

now the URL is the home page of the artifact by default

access

Read More: