First, the discovery of problems
Create a new dynamic Web project in Eclipse, configure local tomcat and write code to select Run on Server, but after running, the WebApps found under the Tomcat installation directory does not appear with the project name created.
Second, verify
Obviously, the project was not automatically deployed to Tomcat's WebApps but was deployed in other containers. Enter http://localhost:8080/webDemo/login.jsp in the built-in browser to open normally. But when you open http://localhost:8080 on an external browser, you do not have the desired kitten screen.
Third, the reason
Eclipse does not deploy the project to the WebApps in the Tomcat installation directory by default, and is deployed to the working directory by default, as MyEclipse
In the. Metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps, the Tmp1 folder contains information about the item.
Iv. modification
In order for the project to be deployed by default to the WebApps in the Tomcat installation directory,
Show view->servers-> Find the tomcat-> right click that needs to be modified
① Stop the Tomcat server within Eclipse (stop)
② Delete the items deployed in this container (add and remove)
③ clear the container-related data (clean)
④ Open the Tomcat modification interface
⑤ Find servers location, select a second (User tomcat installation)
⑥ Modify deploy Path to WebApps
⑦ Save Close
It is important to note that the ①②③ must operate, otherwise the following steps will be dimmed and cannot be manipulated.
Reproduced from: http://www.cnblogs.com/Yogurshine/archive/2013/06/05/3118525.html