文章詳情頁(yè)
java - Eclipse中的 “context root” 和 “content directory” 的作用是什么?
瀏覽:249日期:2023-10-18 09:01:19
問(wèn)題描述
Eclipse中的 “context root” 和 “content directory” 的作用是什么?是tomcat使用的嗎?
是在那里用到的
問(wèn)題解答
回答1:root代表:'localhost:xxx'就是訪(fǎng)問(wèn)/tomcat/webapps/root/的項(xiàng)目
目錄代表:'localhost:xxx/XXX'就是訪(fǎng)問(wèn)/tomcat/webapps/XXX的項(xiàng)目
回答2:Context root: 編譯后項(xiàng)目名稱(chēng)。對(duì)應(yīng)Display-name。Content directory:項(xiàng)目文件根目錄。存放html/jsp/images等目錄的根。當(dāng)訪(fǎng)問(wèn)http://caiyongji.com/index.html 時(shí)對(duì)應(yīng)訪(fǎng)問(wèn)Content directory下index.html,也就是說(shuō)Content directory是網(wǎng)站的根。
可以狹義理解為:
URL: ContextRoot/ContentDirectory/index.html
標(biāo)簽:
java
上一條:java - json串轉(zhuǎn)Map<String, List<Object>>,請(qǐng)問(wèn)如何操作?下一條:java - 如何在tomcat啟動(dòng)的時(shí)候,執(zhí)行項(xiàng)目的初始化程序
相關(guān)文章:
1. javascript - immutable配合react提升性能?2. javascript - sublime快鍵鍵問(wèn)題3. Apache 已經(jīng)把網(wǎng)站根目錄的改為allow from all了,但是服務(wù)器還是不能訪(fǎng)問(wèn)?4. vue.js - Vue 如何像Angular.js watch 一樣監(jiān)聽(tīng)數(shù)據(jù)變化5. css - 寫(xiě)頁(yè)面遇到個(gè)布局問(wèn)題,求大佬們幫解答,在線(xiàn)等,急!~6. javascript - nodejs關(guān)于進(jìn)程間發(fā)送句柄的一點(diǎn)疑問(wèn)7. 配置Apache時(shí),添加對(duì)PHP的支持時(shí)語(yǔ)法錯(cuò)誤8. 實(shí)現(xiàn)bing搜索工具urlAPI提交9. phpstudy8.1支持win11系統(tǒng)嗎?10. javascript - 移動(dòng)端上不能實(shí)現(xiàn)拖拽布局嗎?
排行榜

熱門(mén)標(biāo)簽
網(wǎng)公網(wǎng)安備