简体   繁体   English

从Eclipse启动时无法访问Tomcat

[英]Tomcat unaccessible when started from eclipse

I just installed eclipse and tomcat on a Windows 7. I used latest versions. 我刚刚在Windows 7上安装了eclipse和tomcat。我使用的是最新版本。

For eclipse, http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/SR1/eclipse-jee-juno-SR1-win32-x86_64.zip 对于eclipse, http://www.eclipse.org/downloads/download.php? file = / technology / epp / downloads / release / juno / SR1 / eclipse-jee-juno-SR1-win32-x86_64.zip

For tomcat, http://ftp.unicamp.br/pub/apache/tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34-windows-x64.zip (not the service version). 对于tomcat,请访问http://ftp.unicamp.br/pub/apache/tomcat/tomcat-7/v7.0.34/bin/apache-tomcat-7.0.34-windows-x64.zip (而非服务版本)。

When I run tomcat's startup.bat, it starts up normally and I can access it on port 8080 from browser. 当我运行tomcat的startup.bat时,它将正常启动,并且可以从浏览器访问8080端口。

But I added it in eclipse, and when I start it from eclipse it reports "Started, Synchronized", and no error message is shown, but shows an error page "HTTP Status 404 - /". 但是我在eclipse中添加了它,当我从eclipse中启动它时,它报告“已启动,已同步”,并且未显示任何错误消息,但显示了一个错误页面“ HTTP Status 404-/”。

If I close it in eclipse and run its startup.bat I can access it from browser again. 如果我在eclipse中关闭它并运行它的startup.bat,我可以再次从浏览器访问它。

Eclipse has no configs at all to set, I just point tomcat's installation path. Eclipse根本不需要设置任何配置,我只是指出了tomcat的安装路径。

What can I be doing wrong? 我做错了什么?

try to check the server logs, if there is an error or exception at: 尝试检查服务器日志,如果在以下位置有错误或异常:

.metadata\.plugins\org.eclipse.wst.server.core\tmp0\

at your eclipse work space metadata directory. 在Eclipse工作空间元数据目录中。 anyway there should be some fail reason (exception) reported to console in eclipse IDE or server reports correct start as eg: 无论如何,应该在Eclipse IDE中向控制台报告一些失败原因(异常),或者服务器报告正确的启动,例如:

5.1.2013 17:24:25 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
15.1.2013 17:24:25 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
15.1.2013 17:24:25 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/22  config=null
15.1.2013 17:24:25 org.apache.catalina.startup.Catalina start
INFO: Server startup in 9121 ms

in that case check your servlet mapping and also check if your url root context is correct. 在这种情况下,请检查您的servlet映射,并检查您的url根上下文是否正确。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM