project.iml文件(解决创建maven,发生404错误的某些情况)

当发生以下错误时:
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>

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容