Eclipse中將web項目自動發布到Tomcat webapps下

來源:互聯網
上載者:User

標籤:clip   directory   伺服器配置   file   ref   hit   images   否則   修改   

A:FileàDynamic Web Project【工程名:test】

B:右鍵WebContent,New-->Jsp File

C:右鍵test,Run AsàRun on Serverà伺服器配置—>ApacheàTomcat V7.0 Serverà選擇Tomcat installation directory【F:\Tool\java_software\Eclipse--web\apache-tomcat-7.0.25】,瀏覽地址:http://localhost:8080/test/NewFile.jsp(右鍵NewFile.jsp-->Run As-->Run on Server-->Finish)

1、說明:Eclipse預設使用自己工作空間下的項目資料,不會自動將Web項目發布到Tomcat的webapps下

2、雙擊Server,確保Server下沒有項目,否則修改不了,還不能修改就clean一下

Clean:

3、彈出伺服器配置資訊視窗


4、選擇Use Tomcat installation,Server path會跟著改變,將Deploy path修改為webapps(最好是使用完整的目錄,如:D:\\Tomcat\\webapps),預設是wtpwebapps,ctrl+s儲存

5、配置好Server,右擊項目中.jsp檔案àrun。項目已經發布到Tomcat下的webapps。區域網路訪問:http://192.168.5.103:8080/test/NewFile.jsp

Eclipse中將web項目自動發布到Tomcat webapps下

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.