1.复制原项目文件夹,然后重新命名XXX
2.打开sts点击”File“----------点击“import"------选择”General Existing Projects into Workpace"
3.右击XXX--------点击“Properties”----------点击“Web Project Settings”------”Context root“设置为XXX-------点击”OK“
4.这时项目已经重命名完成,debug as 后发现在tomcat中会运行名会是XXX(旧名),出现这个解决方法:
5.在代码目录XXX\.settings找到文件 org.eclipse.wst.common.component,用记事本将文件打开然后将里面所有出现旧名都修改为XXX