Http://hi.baidu.com/goodfriend_001/item/25d18415aa837d0d8fbde4b3
This section describes how to modify the webroot directory of a web project in eclipse. The project is fixed. However, after Tomcat is started in eclipse, enter http: // localhost: in the browser: 8080/, you cannot open the familiar Tomcat default homepage, but http: // localhost: 8080/projectpath can access the project homepage. Why?
In fact, it is very simple to solve the problem in a few steps:
First, find the servers label (don't tell me you can't find it, so I have nothing to say) and find the Tomcat you have configured, check whether you have added some modules (that is, projects) to Tomcat. If you have added them, right-click the server item you want to configure, my name is "Tomcat v6.0 server at localhost", select add and remove .... in the pop-up dialog box, delete all the modules on the server (because the configuration can be modified only when the module is not added yet, as long as the module is added, the Configuration Modification area is gray. Disabled. See it)
Then, let me know if you have deleted all the modules in it? Okay, clear it. Next, double-click "Tomcat v6.0 server at localhost". In this case, a UI about tomcat configuration will be displayed in your editing window, it's easy to see this interface.
Next, find "server locations" in this interface? No.) in the following three single options, select the second item "use tomcat installation", and then click the next four lines to see if "deploy path" is correct? The default value after it is "wtpwebapps". Change it to "webapps", that is, the name of the folder where the project is released in Tomcat.
So far, the configuration is complete, and the project is added to the "Tomcat v6.0 server at localhost" server again to run.
At this time, you can see the familiar http: // localhost: 8080.
It is possible that when Tomcat is started, due to a large project and a long release time, the release time exceeds, and Tomcat is waiting for release time. On this configuration page, find the "timeouts" option and change the time after "start" to a greater value. The unit is second.