java Apache Tomcat - HTTP 状态 404 - 未找到
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/47432340/
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
Apache Tomcat - HTTP Status 404 - Not Found
提问by Mr. Nacho
I am facing the exact problem stated Tomcat 404 errorand tried all the suggestions but nothing has helped me fix this. Apache Tomcat 9.0 and Eclipse Oxygen is what I'm currently using now and following a tutorial from YouTube.
我正面临着Tomcat 404 错误的确切问题,并尝试了所有建议,但没有任何帮助我解决这个问题。Apache Tomcat 9.0 和 Eclipse Oxygen 是我目前正在使用的,并遵循 YouTube 的教程。
回答by Safeer Ansari
There is a problem with tomcat and the catalina config files:
tomcat和catalina配置文件有问题:
what you have to do is simply:
你要做的很简单:
- Right click on the server tomcat in eclipse
- Click on properties
- Click switch location a little server will appear on the left side in the navigation view
- Double click on it after you have launched your server
- Select use Tomcat installation and save
- 在eclipse中右键服务器tomcat
- 点击属性
- 点击切换位置,导航视图左侧会出现一个小服务器
- 启动服务器后双击它
- 选择使用Tomcat安装并保存
If that's an issue, it should solve the common problem.
如果这是一个问题,它应该可以解决常见问题。
回答by xyz
First try to reach index.html by typing it to URL
首先尝试通过将它输入到 URL 来访问 index.html
You must have a servlet that leads to this default page
您必须有一个指向此默认页面的 servlet
回答by M. Wajdi
Just you need to switch the location
of you tomcat properties
只是你需要switch the location
你的 tomcat 属性
After that double double click on your server on eclipse and choose Use tomcat installation
under the menu of server locations
之后双击您在 eclipse 上的服务器并Use tomcat installation
在服务器位置菜单下选择
回答by Shiv
I'd like to add one suggestion here if Tomcat is on Linux machine,
如果 Tomcat 在 Linux 机器上,我想在这里添加一个建议,
I have faced same issue. In my case Tomcat is deployed to a Linuxsystem and i am not Admin User. When i am starting Tomcat with my account it was giving same error mentioned above. So once i started tomcat with admin account it stated working.
我遇到了同样的问题。在我的情况下,Tomcat 部署到Linux系统,我不是Admin User。当我用我的帐户启动 Tomcat 时,它给出了与上面提到的相同的错误。因此,一旦我使用管理员帐户启动 tomcat,它就表示可以正常工作。