用Eclipse開發(fā)Web項(xiàng)目時(shí),可以通過Tomcat服務(wù)器運(yùn)行Web項(xiàng)目,此時(shí)Web項(xiàng)目被部署在[WorkSpace]/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps中。但是關(guān)閉Eclipse以后Web項(xiàng)目也就不能運(yùn)行了,很不方便。如果能把Web項(xiàng)目部署到Tomcat服務(wù)器中,不運(yùn)行Eclipse也能運(yùn)行Eclipse中的Web項(xiàng)目,就顯得很方便了。
1.停止運(yùn)行Tomcat服務(wù)器,并且Remove Tomcat服務(wù)器下的所有項(xiàng)目;

2.雙擊Tomcat服務(wù)器,進(jìn)入設(shè)置界面,在Server Locations中選擇Use Tomcat Installation(takes control of Tomcat installation),在Deploy path中填寫webapps,然后保存退出;

3.添加一個(gè)Web項(xiàng)目到Tomcat服務(wù)器中,啟動(dòng)一次,再關(guān)閉,然后退出Eclipse,在services.msc中啟動(dòng)Apache Tomcat 7服務(wù),可見Eclipse中的Web項(xiàng)目已經(jīng)在運(yùn)行。
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注