问题描述

项目在Tomcat上运行后,http://localhost:8080/HiSpring/

在浏览器报错:

Error Description: The origin server did not find a currnt representation for the target resource or it not willing to disclose that one exists.

分析:

在控制台中发现,server启动的时候并没有读取项目的web.xml文件,更别说加载其他的配置文件,说明项目根本就没跑起来。

那么web.xml文件是如何读取到的?

右键项目->properties->Deployment Assembly

Tomcat 报错:The origin server did not find a current representation for the target resource

发现项目的部署List文件下并没有 web.xml文件所在的目录,即没有web.xml文件所在的webapp目录。

Tomcat 报错:The origin server did not find a current representation for the target resource

将该目录添加到部署到项目下:

Tomcat 报错:The origin server did not find a current representation for the target resource

Tomcat 报错:The origin server did not find a current representation for the target resource

添加后:

Tomcat 报错:The origin server did not find a current representation for the target resource

重新启动Server,web.xml文件被加载,并且相关配置文件被加载,问题解决。

相关文章:

  • 2021-09-26
  • 2021-11-28
  • 2021-11-05
  • 2021-11-27
  • 2021-11-12
  • 2021-04-30
  • 2021-09-15
  • 2021-08-07
猜你喜欢
  • 2021-08-02
  • 2021-09-30
  • 2021-10-03
  • 2021-09-15
  • 2021-06-19
相关资源
相似解决方案