简体   繁体   中英

Tomcat unaccessible when started from eclipse

I just installed eclipse and tomcat on a Windows 7. I used latest versions.

For 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).

When I run tomcat's startup.bat, it starts up normally and I can access it on port 8080 from browser.

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 - /".

If I close it in eclipse and run its startup.bat I can access it from browser again.

Eclipse has no configs at all to set, I just point tomcat's installation path.

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. anyway there should be some fail reason (exception) reported to console in eclipse IDE or server reports correct start as eg:

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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