Problem:
Many times when you start Tmocat in Eclipse, you cannot access the native localhost:8080 home page, and other items are inaccessible.
Reason:
When you open WebApp under Tomcat, you also any coins to the project directory, because Eclipse redirects the publishing path and does not drop into the webapp under Tomcat.
Solve:
Integrate Tomcat in eclipse to access the localhost:8080 and project sites after launching in Eclipse.
1. Create a new server
File->new->other->server->server->next
My Tomcat is 7.0.35, choose Tomcat under Apache v6.0 Server, start with a server name and click Next
After you configure the server in the popup dialog box, configure the Tomcat installation path and select the appropriate JRE, click Finsh. (Next will let you choose the project you want to run, not the first choice)
OK, one server is created.
2. Configure the deployment path
In the Eclipse Server window, double-click the newly built Tomcat v7.0 and the configuration interface appears.
You can see that the use workspace metadata is selected (does not modify Tomcat installion)
If a project is deployed in this tomcat, the options in the red circle will be grayed out and cannot be modified, and the modifications must first be removed from the deployed service in Tomcat.
(Modified by right-clicking the new Tomcat v7.0 in the Server window select Add and Remove)
Select Use tomcat installation (Task control of Tomcat installation)
That is, choose Tomcat's installation directory as the project's publishing directory, and after selecting the item, the Server path becomes the Tomcat installation directory.
Next, there is a deploy path deployment directory, the default is Wtpwebapps, to the Tomcat publish directory WebApps
After you change the configuration to save the shutdown, after you start the new Tomcat v7.0 in Eclipse, you can access the localhost:8080 normally.
Integrated Tomcat in Eclipse