Modify the default tomacat deployment path in eclipse for javaee. metadata \. plugins \ org. eclipse. wst. server. core \ tmp1 \ wtpwebapps,
. Metadata. plugins \ org. eclipse. wst. server. core \ tmp1 \ wtpwebapps
Since I have written some projects on myeclipse for development, I plan to familiarize myself with the use of eclipse for javaee in the past two days. Do I have to contact me after all? when using this ide, we found this phenomenon. When we configure local tomcat to the new server, and create a new web project in eclipse and deploy it to tomcat, I found that my project was not found in webapps under the tomcat installation path? The getRealpath method of the ServletContext object is used to output the following structure: D: \ javaeedoc. metadata. plugins \ org. eclipse. wst. server. core \ tmp1 \ wtpwebapps:
1. My eclipse workspace is D: \ javaeedoc
2. The default deployment path of the Project is D: \ javaeedoc. metadata. plugins \ org. eclipse. wst. server. core \ tmp1 \ wtpwebapps.
3. Not my D: \ apache-tomcat-7.0.81 \ webapps \ In myeclipse \
2. explain the meaning of this deep path.
We can open this path and see that the directory structure is more than we expected. In fact, D: \ javaeedoc. metadata. plugins \ org. eclipse. wst. server. core \ tmp0 \ This directory is a clone of eclipse's Directory D: \ Tomcat 7.0.81, so that D: \ javaeedoc. metadata. plugins \ org. eclipse. wst. server. core \ tmp0 \ can also be used as the source server.
3. Modify the default path
1. Find the Server panel, right-click the current Tomcat, and remove all the projects first.
2. Right-click the Tomcat and select Clean to clear it.
3. Double-click the Tomcat. On the property panel, locate Server Locations on the left. Select the second option and configure the project path you selected:
Successful!