java打不开tomcat,当Tomcat在Eclipse中运行时,无法打开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

I'm using Tomcat 7.0.27, Eclipse Europa and Java 1.6.0_32. I saw BalusC's answer, but the problem is that I couldn't select Tomcat installation (the picture below).

What could be wrong here?

hoRaE.png

EDIT1 : When I tried to create demo webpage, it couldn't be opened too (with the same error).

EDIT2: Followed this thread Why tomcat server location property is greyed in Eclipse I can open http://localhost:8080/ in the browser, but still cant access the demo web page..

SimpleServletProject

index.html

PS : It seems that there's no more space to me to post index.hmtl (it's just a normal html )..

解决方案

You want to access the root application (http://server:port/) but I'm quite sure that Eclipse wont install a root application. Try to access the application you deployed within the (eclipse managed) tomcat under http://server:port/yourapp.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值