手把手教你如何用eclipse搭建前端開發環境

3.建立靜態web工程css

打開eclipse,選擇file,new project 或者 new other...,選擇web項中的static web project ,next。html

輸入你的項目名,如Html5Demo。填寫content folder名稱,如myHtml5。finishhtml5

右鍵content folder名稱(myHtml5)new HTML File ,填寫 index.html(主頁面不建議使用其餘名字),next web

選擇我html5,以下圖,finish。tomcat

 

 

 

到目前爲止咱們已經基本完成了開發環境的搭建。服務器

用前面相似的方法,咱們能夠在content folder下面建立其它html文件、css文件、js文件或者文件夾,從而豐富咱們的應用。eclipse

若是要開發動態web項目,請繼續閱讀下面的步奏。server

 

3.創建tomcat服務器htm

菜單中點擊window,選擇show view 中的other...  選擇servers ,OK。以下圖:blog

 

 

點擊servers窗口中的連接,以下圖:

 

 

選擇Tomcat 的版本(根據本身的需求), 而後down到本身指定的目錄,等100%後,而後finish(能夠修改server的一些信息)。以下圖:

 

 

 

4.新建工程

new -->new project -->web --> dynamic web project  

填上工程名 ,Target runtime 選擇 Apache Tomcat v 7.0 --> finish 

 

5.發佈項目

在「servers」選項下的服務器選中右鍵,add and remove --> add and finish,ok.

右鍵工程名 -->run as --> run on service 查看效果 或者網頁輸入http://localhost:8080/工程名/ 

相關文章
相關標籤/搜索