Http://blog.csdn.net/wqjsir/article/details/7169838
Symptoms:
Tomcat can be started normally in eclipse, but http: // localhost: 8080/cannot be accessed in the browser, and Error 404 is reported. Other project pages cannot be accessed.
Close tomcat in eclipse and double-click startup. bat under the tomcat installation directory to manually start the tomcat server. Access htt: // localhost: 8080/to access the tomcat Management page.
Symptom cause:
Eclipse redirects the tomcat project release directory (webapp In the tomcat directory), so you will find that your project file cannot be found in the webapp directory under the tomcat installation directory.
Solution:
Reconfigure the tomcat server:
On the server page in eclipse, double-click the tomcat service and you will see the configuration page:
You can see that the Use workspace metadata (does not modify Tomcat installion) is selected in the red circle)
If a project is deployed in tomcat, the options in the red circle will be grayed out and cannot be modified. to modify the options, you must first remove all deployed services in tomcat.
Right-click the tomcat server and choose Add and Remove. In the displayed dialog box, Remove the deployed project. After you have removed the settings, you can see that the options panel is editable.
Select Use tomcat installation (Task control of Tomcat installation) to select the tomcat installation directory as the release directory of the project.
Then, in the next four lines, do you see "Deploy Path? The default value is "wtpwebapps". Change it to "webapps", that is, tomcat.
The name of the folder where the publish project is located. After modification, close the page and save the configuration. In this way, the project is deployed to the webapp under the tomcat installation directory.
Restart the tomcat server and access http: // localhost: 8080, And the deployed project can be accessed normally.