eclipse运行web项目,出现 HTTP Status 404 – Not Found

Type: Status Report
Message: /WebTestwjc/
Description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

http://localhost:8080/ 可以访问
但是 http://localhost:8080/WebTestwjc/ 就是访问不了,求大神指教
图片说明

你的tomcat发布的时候的path是‘/’没有带WebTestwjc吧。你去看看图片说明

检测一下配置文件呢,

eclipse 普通的配置是 http://localhost:8080/ 这样不能够访问 ,需要在后面更项目名称 : http://localhost:8080/xxxxx/xxx.jsp 这样。
所以可能你修改到配置了。可以直接删除tomcat 服务重新加入。试试呢?

检查下项目名是否正确,还有webapp 下是否有html 文件

Description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
这句话说找不到资源,是不是你的css,js或者图片这样的静态资源路径没有配置好

  1. 在http://localhost:8080/后加上你的项目名字然后跟webinfo 下的 .html文件。。。
  2. 或者直接在tomcat里面路径配置,/后面加项目名,输入的时候就不用添加了

楼主问题解决了吗??我的也出现这种情况了。。

如果是Java, 将编译后的classes 文件夹与 web.xml 都放在即WEB-INF目录下(猜测动态网页的编译结果都是相同逻辑)
实在不行可以试着将程序先导出为war 包,放到webapps 下,然后看看是否可以正常访问,如果可以,对比一下tomcat 释放出来的内容和你自己放的内容是否一致;
另外这里要注意 WEB-INF 下必须要有web.xml文件,有Servelet 配置信息。

还有就是 html 的静态网页,不要放在 WEB-INF 下,会访问不到,放在WEB-INF 的上一层目录即可。

我的是使用window.location.href 进行excel模板下载。。。但是报错 中文乱码问题。。错误描述跟你一样