我正在创建一个Web应用,尝试运行“ http://localhost:8080/”时出现错误
HTTP Status 404 – Not Found
Type Status Report
Message Not found
Description The origin server did not find a current representation for
the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.20
web.xml
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
id="WebApp_ID" version="3.1"
searchServlet
com.incidents.cashout.CurlExecutor
searchServlet
/servlet
index.jsp
getInputs.html
我尝试使用其他解决方案,但似乎都不起作用。任何帮助将不胜感激
我正在创建一个Web应用,尝试运行“ http://localhost:8080/”时出现错误HTTP Status 404 – Not FoundType Status ReportMessage Not foundDescription The origin server did not find a current representation forthe target resource ...
IDEA
-
Tomcat
-
源
服务器
未能
找到
目标
资源
的
表示
或者是不愿公开一个已经
存在
的
资源
表示
1起因2经过3说白了
在学习springMVC的过程中,写了一个demo需要部署到本地
Tomcat
上来运行(直接使用
IDEA
配置本地
tomcat
,不用再手动发war包到
tomcat
目录下)。因为之前用SpringBoot项目比较多(集成了
Tomcat
,不需要额外部署设置;也不需要额外配好多xml),所以这部分可以说是从0学起,踩了好多坑。
出现上面“
源
服务器
未能
找到
目标
资源
的
表示
或者是不愿公开一个已经
存在
的
资源
Java web项目报错:HTTP Status 404 – Not Found Type Status Report Message /WebProject/ Description The ori
官网链接:http://
tomcat
.apache.org/
选择download,
找到
自己所要的版本,下载对应版本的
Tomcat
。
跟我之前的文章一样,我依旧推荐下载免安装的压缩包。
有zip和exe两种格式的,zip(64-bit Windows zip(pgp,md5,sha1))是免安装版的,exe(32-bit/64-bit Windows Service installer(pgp,md5,sha1))是安装版。同时观察自己的电脑是64位系统还是32位系统。
此处选择下载zip版;
第二步 体验Tom
今天配置
tomcat
然后配置成功了,点击startup后
tomcat
也启动了,如下图。但是无法访问http://localhost:8080,开始查找原因·
首先确定自己java环境变量配置好了。配置如下:
JAVA_HOME
H:Javajdk
==================================
CLASSPATH
.;%JAVA_HOME%lib;%JAVA_HOME%lib ools.jar
//这里一定要注意最前面.;
===============================
一、安装好Tomat之后首先要检查环境变量的配置,这个自行百度。
二、电脑必须安装了JDK,如果你的电脑安装了多个版本JDK,则必须配置环境变量JAVA_HOME 的值为(C:Program FilesJavajdk1.6.0_11)即你安装的JDK安装路径。
三、如JDK安装和配置没有问题,则应该确定你的
Tomcat
端口是否为8080,这在
Tomcat
安装时默认端口即为8080。在启动
Tomcat
6.exe时,可以查看到
服务器
的监听的端口为:8080。