我在这里遇到了同样的问题:Tomcat 在 eclipse 中启动但无法连接到 http://localhost:8085/ 的链接,这意味着我无法在浏览器中打开http://localhost:8080/ :
HTTP Status 404 - /
type Status report
message /
description The requested resource (/) is not available.
Apache Tomcat/7.0.27
//Console info when tomcat started//
Apr 10, 2012 4:26:32 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to org.eclipse.jst.jee.server:SimpleServletProject' did not find a matching property.
Apr 10, 2012 4:26:32 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Apr 10, 2012 4:26:33 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Apr 10, 2012 4:26:33 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 880 ms
Apr 10, 2012 4:26:33 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Apr 10, 2012 4:26:33 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.27
Apr 10, 2012 4:26:33 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Apr 10, 2012 4:26:33 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Apr 10, 2012 4:26:33 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 495 ms
我正在使用 Tomcat 7.0.27、Eclipse Europa 和 Java 1.6.0_32。看到了BalusC的回答,但是问题是不能选择Tomcat安装(下图)。
这里有什么问题?
EDIT1:当我尝试创建演示网页时,它也无法打开(同样的错误)。
EDIT2:关注了这个线程为什么在Eclipse中tomcat服务器位置属性是灰色的我可以在浏览器中打开 http://localhost:8080/,但仍然无法访问演示网页..
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web- app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>SimpleServletProject</display-name>
<welcome-file-list>
<welcome-file> index.html</welcome-file>
</welcome-file-list>
</web-app>
PS:似乎没有更多空间给我发布 index.hmtl (它只是一个普通的 html )..