当发生以下错误时:
HTTP Status 404 – Not Found
Type Status Report
Message /
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.7
并且如果project.iml中只有以下2行代码:
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4" />
须在对应的工程.iml中复制粘贴如下代码:(只针对某些特殊情况(这里所说的情况))
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<descriptors>
<deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/src/main/webapp/WEB-INF/web.xml" />
</descriptors>
<webroots>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
</configuration>
</facet>
</component>
</module>