尝试在 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
"HTTP Status 404 - /" (localhost:8080) when trying to install apache tomcat in Eclipse
提问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.
嗨,我遇到了同样的问题,以下步骤解决了问题。
- In the eclipse right click on server and click on properties.
- If Location is set workspace/metadata click on switch location and so that it refers to
/servers/tomcatv7server
atlocalhost.server
- Save and close
- Next double click on server
- Under server locations mostly it would be selected as
useworkspacemetadata
- Instead, select
usetomcatinstallation
- Save changes
- Restart server and verify
localhost:8080
works.
- 在 Eclipse 中右键单击服务器并单击属性。
- 如果位置设置为工作空间/元数据,请单击切换位置并使其引用
/servers/tomcatv7server
于localhost.server
- 保存并关闭
- 接下来双击服务器
- 在大多数服务器位置下,它会被选为
useworkspacemetadata
- 而是选择
usetomcatinstallation
- 保存更改
- 重新启动服务器并验证
localhost:8080
工作正常。