java http状态404,TOMCAT - HTTP状态404

I set up my server in eclipse and when I run it the console prints:

mai 02, 2013 4:05:13 PM org.apache.catalina.core.AprLifecycleListener init

INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files (x86)\Microsoft Application Virtualization Client;c:\Program Files (x86)\Open Text\View\bin;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\ThinkPad\Bluetooth Software\;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Java\jre7\bin;C:\WorkspacePPL\apache-maven-3.0.4\bin;.

mai 02, 2013 4:05:13 PM org.apache.tomcat.util.digester.SetPropertiesRule begin

WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ppl-webapp' did not find a matching property.

mai 02, 2013 4:05:13 PM org.apache.coyote.http11.Http11Protocol init

INFO: Initializing Coyote HTTP/1.1 on http-8080

mai 02, 2013 4:05:13 PM org.apache.catalina.startup.Catalina load

INFO: Initialization processed in 604 ms

mai 02, 2013 4:05:14 PM org.apache.catalina.core.StandardService start

INFO: Starting service Catalina

mai 02, 2013 4:05:14 PM org.apache.catalina.core.StandardEngine start

INFO: Starting Servlet Engine: Apache Tomcat/6.0.36

mai 02, 2013 4:05:14 PM org.apache.coyote.http11.Http11Protocol start

INFO: Starting Coyote HTTP/1.1 on http-8080

mai 02, 2013 4:05:14 PM org.apache.jk.common.ChannelSocket init

INFO: JK: ajp13 listening on /0.0.0.0:8009

mai 02, 2013 4:05:14 PM org.apache.jk.server.JkMain start

INFO: Jk running ID=0 time=0/22 config=null

mai 02, 2013 4:05:14 PM org.apache.catalina.startup.Catalina start

INFO: Server startup in 493 ms

but then, if I browse http://localhost:8080 I get:

HTTP Status 404 - /

---------------------------------------------------------------------

type Status report

message /

description The requested resource is not available.

While I should see the Tomcat welcome page.

If I run Tomcat outside of eclipse I can reach the welcome page.

解决方案

Click on Window > Show view > Server or right click on the server in "Servers" view, select "Properties".

In the "General" panel, click on the "Switch Location" button.

The "Location: [workspace metadata]" should replace by something else.

Open the Overview screen for the server by double clicking it.

In the Server locations tab , select "Use Tomcat location".

Save the configurations and restart the Server.

You may want to follow the steps above before starting the server. Because server location section goes grayed-unreachable.

e0hzr.png

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值