Have a problem

  1. Direct access, unable to access the project, is directed to Tomcat’s default page

  1. The page can be requested, but the interface cannot be requested normally. 404 is reported

The solution

Go to the Tomcat/conf directory and open server. XML and add the following configuration in the bottom TAB

<Context path="" 
        docBase="D:\apache-tomcat\webapps\MyProjectName" 
        reloadable="false" />
Copy the code

“MyProject” is the file name extracted from the project war package. It is not followed by “\”.

PS: You must remember to reboot to modify the configuration!

effect

No need for direct access to the project name, instantly feel much cleaner. >_<YY