我在我的计算机上安装了 tomcat v6.0,我正在尝试访问网页。我为 SVN 添加了一个项目到 eclipse。当我尝试将其作为服务器运行时,它会显示以下页面:
HTTP Status 404 - /first/
--------------------------------------------------------------------------------
type Status report
message /first/
description The requested resource is not available.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.37
还在控制台上记录了这些:
02.Tem.2013 16:36:45 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\jre6\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Perl\site\bin;C:\Perl\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\mingw\bin;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\nodejs\;C:\Python27;C:\Python27\Scripts;C:\GNUstep\GNUstep\System\Tools;C:\Users\HasanFerit\AppData\Roaming\npm;.
02.Tem.2013 16:36:45 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:first' did not find a matching property.
02.Tem.2013 16:36:45 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
02.Tem.2013 16:36:45 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 586 ms
02.Tem.2013 16:36:45 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
02.Tem.2013 16:36:45 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.37
02.Tem.2013 16:36:46 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
02.Tem.2013 16:36:46 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
02.Tem.2013 16:36:46 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/14 config=null
02.Tem.2013 16:36:46 org.apache.catalina.startup.Catalina start
INFO: Server startup in 480 ms
然后我尝试打开 localhost:8080,我也不起作用...它打开了相同的页面。我不工作。什么会导致这个问题?你能帮帮我吗?
最佳答案
当您从 Eclipse 运行 Tomcat 时,它不会向您显示位于 localhost:8080/
的默认页面。在 Eclipse 之外运行它以查看该页面。
对于您的项目,检查WEB-INF/web.xml
文件以查看welcome-file-list
中有哪些默认页面可用。 Tomcat 检查该列表以尝试解析对 Web 应用根目录的请求。
关于eclipse - 无法访问本地主机 :8080 tomcat default page,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17435935/