【发布时间】:2021-06-19 09:33:06
【问题描述】:
我尝试在 apache tomcat 中部署一个 war 文件,并尝试了来自浏览器的不同服务。但我收到以下错误。
<html lang="en">
<head>
<title>HTTP Status 404 – Not Found</title>
</head>
<body>
<h1>HTTP Status 404 – Not Found</h1>
<hr class="line" />
<p><b>Type</b> Status Report</p>
<p><b>Message</b> The requested resource [/executor.war/executor/create] is not
available</p>
<p><b>Description</b> The origin server did not find a current representation for the target resource
or is not
willing to disclose that one exists.</p>
<hr class="line" />
<h3>Apache Tomcat/9.0.44</h3>
</body>
</html>
我尝试了 Get 和 Post 映射,但都不起作用。 我还尝试从重定向端口 8443 部署和运行 war 文件,但它会引发以下错误。
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
There was an unexpected error (type=Not Found, status=404).
No message available
我还检查了网址,这是绝对正确的。例如http://localhost:8443/project/ping 这里的项目是我的战争文件名。 我的项目连接了MongoDB,对我的项目有影响吗?
请帮我解决这个错误。谢谢。
【问题讨论】:
-
war 文件名中的
.war部分不应成为项目 URL 的一部分。 -
在 Tomcat 日志文件中查找应用程序的启动错误并将其发布在此处;使用 Tomcat Manager 查找有关您的 web 应用程序的信息。
标签: java eclipse tomcat postman