在用Eclipse+Tomcat配置J2EE項目時,出現(xiàn)如下提示錯誤:
Undeployment Failure could not be redeployed because it could not be completely removed in the undeployment phase. the most common cuase of this problem is attempting to redeploy while the server is running,which has locked one or more files.
to correct the deployment you will need to stop the server and then redeploy the project before restarting the server.
最終解決方法如下:
1、停止運行Tomcat,右鍵點擊項目名稱:
2、點擊“Properties”,在彈出窗口選中“Java Build Path”,再點“Libraries”書簽,如下圖
3、把所有項目的jar都Remove掉,然后再把這個項目的jar都加進來,
4、添加完后,再次Redeploy,
5、看到Successfully deplayed,即配置成功了。如上圖。