双击服务器选项卡中的Tomcat服务器条目，您将得到服务器配置。在左侧列中，在服务器位置下，选择使用Tomcat安装（注意，当它变灰时， ））。这样，Eclipse将完全控制Tomcat，这样，当您从Eclipse中运行时，您也可以使用Tomcat Manager访问默认的Tomcat主页。我在开发使用Eclipse时看不出有用的方法。
I integrated Tomcat 7 in Eclipse. When I start it using Eclipse, it shows that Tomcat is up and running, but when I go to http://localhost:8080 in my browser, it gives me following error:
HTTP Status 404 - /
type Status report
description The requested resource (/) is not available.
I tried changing the port in
server.xml just in case if 8080 is used by another service, but it didn't work either. How can I solve it?
What are you expecting? The default Tomcat homepage? If so, you'll need to configure Eclipse to take control over from Tomcat.
Doubleclick the Tomcat server entry in the Servers tab, you'll get the server configuration. At the left column, under Server Locations, select Use Tomcat installation (note, when it is grayed out, read the section leading text! ;) ). This way Eclipse will take full control over Tomcat, this way you'll also be able to access the default Tomcat homepage with the Tomcat Manager when running from inside Eclipse. I only don't see how that's useful while developing using Eclipse.
The port number is not the problem. You would otherwise have gotten an exception in Tomcat's startup log and the browser would show a browser-specific "Connection timed out" error page (and thus not a Tomcat-specific error page which would impossibly be served when Tomcat was not up and running!)