一、步驟說明
- File->New->Projet from existing sources,選擇要導入的項目,並且導入項目;
- 打開 “open module settings”進行設置;
- 設置Libraries導入jar包(如果有的話);
- 設置Facets;
- 設置Artifacts;
- 配置Tomcat服務器;
- 運行項目。
二、步驟詳解
1、File->New->Projet from existing sources,選擇要導入的項目,並且導入項目;
引入項目: 
選擇工程路徑: 
選擇 “Create project form existing sources”: 
下一步: 
下一步: 
完成: 
2、打開 “open module settings”進行設置;
選中工程右鍵->open module settings: 
3、設置Libraries導入jar包(如果有的話);
4、設置Facets;
點擊加號->web: 

選中項目: 
設置 Web Module Deployment Descriptor 路徑,即 web.xml 的路徑: 
設置 Web Resource Directories 的路徑,即 WebRoot 的路徑: 
5、設置Artifacts;
點擊加號,選中 Web Application: Archive,並設置名稱為 MyEclipseProject:war: 
點擊加號,選中 Web Application: Exploded-> from modules,選中工程,點擊ok: 


6、配置Tomcat服務器;
選中Edit Configurations: 
點擊加號,選擇Tomcat Server->Local: 
點擊 Deployment,設置 Artifacts: 
選中 MyEclipseProject:war exploded: 
設置 Application Context,並且點擊 Apply: 
設置 Name, Application Server, On ‘Update’ action 和On frame deactivation: 
7、運行項目。
點擊下圖圖標運行項目: 

成功! 
轉載:
https://blog.csdn.net/u012099869/article/details/51038860
