In Eclipse, Tomcat imports the project and modifies the project name, add the item to Tomcat, and find that the current project has a parenthesis that shows the name of the original project and can only be accessed with the original project name. The question is, how do you want to access it with a new project name? When this problem was first encountered, but also very distressed, asked many predecessors and various resources, only to be successfully resolved. The complete solution is summarized below, and this method is only used for learning communication. If there are similarities, please Haihan!
1. Open your project directory, locate a. project file, open and modify the values in the <name> test</name>, and change the test to the name you want to modify;
2. in the project directory, open the. Settings folder, locate the Org.eclipse.wst.common.component file, and modify the <wb-module deploy-name= "test"; Change the test to the name you want to modify, and check that the value in <property name= "Context-root" value= "test"/> is the name you want to modify. Because the value in Context-root is the next step to be modified on eclipse;
3. in Eclipse, right click on the item (or shortcut key Alt+enter), find the bottom of the properties, click Go to find Web project Settings, modify the value of the context root for the name you want to change;
4. refresh your project;
5. Right-click your tomcat server, clean your project, then remove;
Generally more than five steps can be a good solution to the problem, if still exist, it is recommended that you perform the sixth step, close Eclipse and restart, this will completely solve the problem.
6. Turn off eclipse restart;
Copy the imported item in Eclipse and modify the original project name, and the parentheses after the item show the original item's name!