HTTP status 404 -The origin server did not find a current representation for the target resource

HTTP status 404 -The origin server did not find a current representation for the target resource_第1张图片
Tomcat 在eclipse一运行时在eclipse就会弹出如图所示的消息:
HTTP Status 404–Not Found
The origin server did not find a current representation for the target resource

网上有很多错误的原因,我这个比较特殊,网上没有看到我这种错误原因和解决办法,所以今天给大家分享一下,希望有用。

错误原因:我也不知道….
错误情况:HTTP Status 404–Not Found
The origin server did not find a current representation for the target resource

解决办法:(两个情况,有时候一个行有时候另一个行)
方法一:直接删掉eclipse项目中文件夹WebContent->WEB-INF->web.xml文件(如果没有的这个的话请忽略)
HTTP status 404 -The origin server did not find a current representation for the target resource_第2张图片

方法二:删除你刚刚创建创建的servlet或者.class文件,删除之后再建立一个。有可能再建立一个之后第一次还会弹出这个错误,但是第二次启动可能就不会了。

HTTP status 404 -The origin server did not find a current representation for the target resource_第3张图片

祝好!

你可能感兴趣的:(JAVA基础)