idea導入eclipse的web項目
idea導入eclipse的web項目
1、導入本身的web項目
步驟:File->New->Project from Existing Source...
2、選擇項目的所在位置,點擊"OK";接着以下圖所示的步驟操做:
![圖一](http://static.javashuo.com/static/loading.gif)
![圖二](http://static.javashuo.com/static/loading.gif)
![圖三](http://static.javashuo.com/static/loading.gif)
![圖四](http://static.javashuo.com/static/loading.gif)
![圖五](http://static.javashuo.com/static/loading.gif)
3、成功導入項目以後,點擊圖中紅色框中的選項:
![圖六](http://static.javashuo.com/static/loading.gif)
4、進入到此頁面後,咱們先選擇」Project」,在」Project SDK」選擇本身的JDK,而後在」Project Language level」中選擇與本身JDK相對應的(我使用的是JDK1.8,因此這裏我使用的是:
![圖七](http://static.javashuo.com/static/loading.gif)
5、接着進入」Modules」,看到導入的項目會報錯導入的項目會報錯,不用着急,以下圖所示」Dependencies」中,在」Module SDK」中選擇本身的SDK,接着如圖所示選中報錯的,點擊右側的」—」,清除他們,而後在添加本身的Tomcat:
![圖八](http://static.javashuo.com/static/loading.gif)
6、進入」Libraries」中,在中間部分點擊」+」,添加lib目錄下面的jar包:
![15](http://static.javashuo.com/static/loading.gif)
![16](http://static.javashuo.com/static/loading.gif)
7、進入」Facets」,在中間部分點擊」+」,選擇」Web」,在選擇本身項目的名稱,同時也須要注意一點,在」Web Resource Directory」中選擇正確的目錄,在eclipse中是"WebContent":
![17](http://static.javashuo.com/static/loading.gif)
8、進入」Artifacts」中,點擊」+」---->」Web Application Exploded」---->」From Modules」;選擇本身的項目名稱,生成以下圖所示則成功,至此咱們的配置完成了大部分,點擊」Apply」-->」OK」.:
![圖十](http://static.javashuo.com/static/loading.gif)
9、點擊下圖」倒三角」,選擇」 Edit Configurations」:
![圖十一](http://static.javashuo.com/static/loading.gif)
10、點擊圖中的」+」,選擇」Tomcat Server」--->」Local」,則會進入以下界面;修改Application Server的名稱和添加Tomcat,而後點擊橢圓形」Deployment」:
![圖十二](http://static.javashuo.com/static/loading.gif)
11、」Deploy at the server startup 」中添加生成的」War」;以下圖所示:
![圖十三](http://static.javashuo.com/static/loading.gif)
12、至此咱們的配置已然完成點擊」Apply」--->」OK」,在首頁生成以下圖所示的」tomcat」圖案。
![圖十四](http://static.javashuo.com/static/loading.gif)
十3、至此咱們已然導入成功了,能夠開始Web項目的開發工做了
歡迎關注本站公眾號,獲取更多信息