HTTP状态404 - 请求的资源(/)不可用 [英] HTTP Status 404 - The requested resource (/) is not available

查看:22537
本文介绍了HTTP状态404 - 请求的资源(/)不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中集成了Tomcat 7。当我使用Eclipse启动它时,它显示Tomcat已启动并运行,但是当我转到 http:// localhost:8080 在我的浏览器中,它给我以下错误:


HTTP状态404 - /



类型状态报告



消息 /



描述请求的资源(/)不可用。



Apache Tomcat / 7.0.23


我尝试更改端口 server.xml ,以防其他服务使用8080,但也不起作用。我如何解决?

解决方案

你期待什么?默认的Tomcat主页?如果是这样,您需要配置Eclipse以从Tomcat进行控制。



双击服务器选项卡中的Tomcat服务器条目,您将得到服务器配置。在左侧列中,在服务器位置下,选择使用Tomcat安装(注意,当它变灰时, ))。这样,Eclipse将完全控制Tomcat,这样,当您从Eclipse中运行时,您也可以使用Tomcat Manager访问默认的Tomcat主页。我在开发使用Eclipse时看不出有用的方法。





端口号不是问题。否则在Tomcat的启动日志中会出现异常,浏览器会显示特定于浏览器的连接超时错误页面(因此Tomcat特定的错误页面不会在Tomcat未启动并运行时无法提供) )


I integrated Tomcat 7 in Eclipse. When I start it using Eclipse, it shows that Tomcat is up and running, but when I go to http://localhost:8080 in my browser, it gives me following error:

HTTP Status 404 - /

type Status report

message /

description The requested resource (/) is not available.

Apache Tomcat/7.0.23

I tried changing the port in server.xml just in case if 8080 is used by another service, but it didn't work either. How can I solve it?

解决方案

What are you expecting? The default Tomcat homepage? If so, you'll need to configure Eclipse to take control over from Tomcat.

Doubleclick the Tomcat server entry in the Servers tab, you'll get the server configuration. At the left column, under Server Locations, select Use Tomcat installation (note, when it is grayed out, read the section leading text! ;) ). This way Eclipse will take full control over Tomcat, this way you'll also be able to access the default Tomcat homepage with the Tomcat Manager when running from inside Eclipse. I only don't see how that's useful while developing using Eclipse.

The port number is not the problem. You would otherwise have gotten an exception in Tomcat's startup log and the browser would show a browser-specific "Connection timed out" error page (and thus not a Tomcat-specific error page which would impossibly be served when Tomcat was not up and running!)

这篇关于HTTP状态404 - 请求的资源(/)不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆