關於在Eclipse中部署時webapps目錄下沒有web應用程式的解決辦法

來源:互聯網
上載者:User

測試環境:


windows8系統


Tomcat8.0伺服器


原因:Eclipse配置tomcat預設的web應用程式是部署到.metadata\.plugins\org.eclipse.wst.server.core\tmp0目錄下的,wtpwebapps目錄裡。


修改方法:

在Eclipse下開啟server視圖選項卡,若已將項目部署,則先移除,如圖:



移除後,按右鍵,選擇clean:


再右擊開啟open,進入配置頁面。此時紅框內的選項就不會是灰的,選擇第二個選項

1. Use workspace metadata (does not modify Tomcat installation);

2. Use Tomcat installation (take control of Tomcat Installation);

3. Use Custom location (does not modify Tomcat installation);


 但是如果選項還是灰的則需要重複之前的操作,最後才能修改此項配置;

 除此之外,此選項下面還有兩個參數輸入框:

 1. Server path(即tomcat或者eclipse根目錄)

 2. Deploy path(工程檔案的根目錄,tomcat一般為webapps,workspace下一般為wtpwebapps)

 預設情況下Deploy path為.metadata\.plugins\org.eclipse.wst.server.core\tmp0\

這時,就改成tomcat的web應用目錄即可。



參考資料:

http://www.xue163.com/152/6/1523779.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.