在idea中使用Tomcat启动项目访问报错The origin server did not find a current representation for the target

背景:

在idea中使用Tomcat启动项目可以访问首页,也可以上传文件

在idea中使用Tomcat启动项目访问报错The origin server did not find a current representation for the target

点击提交跳转到下一个页面就报错,点击其他跳转的页面也是同样的错误

The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

在idea中使用Tomcat启动项目访问报错The origin server did not find a current representation for the target


原因分析:

这个问题主要是在终端里面启动了Tomcat,在idea中又再次启动后冲突了。


解决办法:

springboot项目用默认的Application启动就可以了

在idea中使用Tomcat启动项目访问报错The origin server did not find a current representation for the target


只能用tomcat启动的就参考如下(没亲自试验过):

1. 停止idea中的Tomcat(点右上角的红色正方形按钮)

2. 打开终端-输入“cd ”(cd+空格)然后把Tomcat目录下的bin文件夹拖进终端,回车

3. 输入命令“./shutdown.sh”

4. 再次启动idea中的Tomcat即可


参考链接:

https://www.cnblogs.com/tongfukezhan/p/7729043.html