1.Eclipse的安裝與配置
略
2.Tomcat的安裝與配置
略
3.Eclipse中配置tomcat
1)Window-References-Server-Runtime Environments,選擇Add;

2)選擇相應的tomcat版本,勾選Create a new local server選項,點擊Next進行下一步;

3)Browse選擇相應的tomcat的安裝路徑,點擊Finish完成Server runtime environment的配置;

4)此時在server的窗口中能夠看到配置好的server;

5)點擊startup the server可以啟動server,控制台出現如下Server startup in xxx ms的提示表示服務器成功啟動。

6)注意此時訪問localhost:8080並不能成功訪問,這一點和直接用dos啟動tomcat不同,Eclipse中需要建立web項目才能成功訪問。
關於Eclipse中建立web項目並使用servlet請參考Eclipse中建立web項目並使用servlet。
