The origin server did not find a current representation for the target resource...报错解决

时间:2024-03-14 09:15:49

一、报错如图

The origin server did not find a current representation for the target resource...报错解决

二、解决方案

1.看了很多网上的方案,真心发现在众多方案中找到正确的解决办法很困难?!
2.此问题归根就是对tomcat的理解不够深刻,那么我们只需要重新导入一下tomcat即可解决问题

那么首先开始创建一个JavaWeb项目:
1.创建项目:Create New Project
The origin server did not find a current representation for the target resource...报错解决

2.配置TOMCAT
The origin server did not find a current representation for the target resource...报错解决

The origin server did not find a current representation for the target resource...报错解决这里的versions有个小bug,改成Java EE 7也没有4.0,会卡在4.0无法切换,这时候只需要,重新点击左上角的java再点击Java Enterprise就可以重新选择versions了

3.打开WEB-INF的终端
The origin server did not find a current representation for the target resource...报错解决
4.创建俩文件classes和lib

The origin server did not find a current representation for the target resource...报错解决

5.点击右上角的这个东西,修改项目依赖
The origin server did not find a current representation for the target resource...报错解决

The origin server did not find a current representation for the target resource...报错解决
6.找到classes后,复制一下Output path里面内容,粘贴到下面Test output path,让上下一样
The origin server did not find a current representation for the target resource...报错解决

7.配置tomcat
The origin server did not find a current representation for the target resource...报错解决
The origin server did not find a current representation for the target resource...报错解决综上我们就重新配置了TOMCAT一遍,再运行项目就不会报错了