尝试在 Eclipse 中安装 apache tomcat 时出现“HTTP 状态 404 - /”(本地主机:8080)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11003135/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 18:21:15  来源:igfitidea点击:

"HTTP Status 404 - /" (localhost:8080) when trying to install apache tomcat in Eclipse

eclipsetomcat

提问by programmer

i have installed eclipse on Windows Vista and i have added a new Apache Tomcat server Apache Tomcat/7.0.27.

我已经在 Windows Vista 上安装了 eclipse,并且我添加了一个新的 Apache Tomcat 服务器 Apache Tomcat/7.0.27。

After i start the Apache in eclipse, i type in the url the following address "localhost:8080"

在 Eclipse 中启动 Apache 后,我在 URL 中输入以下地址“localhost:8080”

i get a page saying:

我得到一个页面说:

HTTP Status 404 - /
type Status report
message /
description The requested resource (/) is not available.
Apache Tomcat/7.0.27

回答by PavanJoshi

Hi I faced same problem and below steps resolved the problem.

嗨,我遇到了同样的问题,以下步骤解决了问题。

  1. In the eclipse right click on server and click on properties.
  2. If Location is set workspace/metadata click on switch location and so that it refers to /servers/tomcatv7serverat localhost.server
  3. Save and close
  4. Next double click on server
  5. Under server locations mostly it would be selected as useworkspacemetadata
  6. Instead, select usetomcatinstallation
  7. Save changes
  8. Restart server and verify localhost:8080works.
  1. 在 Eclipse 中右键单击服务器并单击属性。
  2. 如果位置设置为工作空间/元数据,请单击切换位置并使其引用/servers/tomcatv7serverlocalhost.server
  3. 保存并关闭
  4. 接下来双击服务器
  5. 在大多数服务器位置下,它会被选为 useworkspacemetadata
  6. 而是选择 usetomcatinstallation
  7. 保存更改
  8. 重新启动服务器并验证localhost:8080工作正常。