文章詳情頁
java - Eclipse中的 “context root” 和 “content directory” 的作用是什么?
瀏覽:131日期:2023-10-18 09:01:19
問題描述
Eclipse中的 “context root” 和 “content directory” 的作用是什么?是tomcat使用的嗎?
是在那里用到的
問題解答
回答1:root代表:'localhost:xxx'就是訪問/tomcat/webapps/root/的項(xiàng)目
目錄代表:'localhost:xxx/XXX'就是訪問/tomcat/webapps/XXX的項(xiàng)目
回答2:Context root: 編譯后項(xiàng)目名稱。對(duì)應(yīng)Display-name。Content directory:項(xiàng)目文件根目錄。存放html/jsp/images等目錄的根。當(dāng)訪問http://caiyongji.com/index.html 時(shí)對(duì)應(yīng)訪問Content directory下index.html,也就是說Content directory是網(wǎng)站的根。
可以狹義理解為:
URL: ContextRoot/ContentDirectory/index.html
標(biāo)簽:
java
上一條:java - json串轉(zhuǎn)Map<String, List<Object>>,請(qǐng)問如何操作?下一條:java - 如何在tomcat啟動(dòng)的時(shí)候,執(zhí)行項(xiàng)目的初始化程序
相關(guān)文章:
1. css - 求推薦幾款好用的移動(dòng)端頁面布局調(diào)試工具呢?2. javascript - 百度echarts series數(shù)據(jù)更新問題3. css3 - 手機(jī)網(wǎng)頁中用css寫1px的描邊,為什么需要加一句overflow:hidden才能真正顯示1px?4. php - 第三方支付平臺(tái)在很短時(shí)間內(nèi)多次異步通知,訂單多次確認(rèn)收款5. Mysql && Redis 并發(fā)問題6. javascript - node服務(wù)端渲染的困惑7. css3 - css before 中文亂碼?8. mysql - 一個(gè)表和多個(gè)表是多對(duì)多的關(guān)系,該怎么設(shè)計(jì)9. python - type函數(shù)問題10. mysql新建字段時(shí) timestamp NOT NULL DEFAULT ’0000-00-00 00:00:00’ 報(bào)錯(cuò)
排行榜

熱門標(biāo)簽