最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Tomcat中更改網(wǎng)站根目錄和默認頁的配置方法

 更新時間:2014年05月07日 09:16:35   作者:  
這篇文章主要介紹了Tomcat中更改網(wǎng)站根目錄和默認頁的配置方法,需要的朋友可以參考下

1.tomcat原來的默認根目錄是http://localhost:8080,如果想修改訪問的根目錄,可以這樣:

找到tomcat的server.xml(在conf目錄下),找到:

復(fù)制代碼 代碼如下:
<Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false"></Host>


在</Host>前插入:

復(fù)制代碼 代碼如下:
<Context path="" docBase="D:/eclipse3.3/jb51.net/tomcat/" debug="0"/>

其中D:/eclipse3.3/jb51.net/tomcat/就是我想設(shè)置的網(wǎng)站根目錄,然后重啟tomcat。


再次訪問http://localhost:8080時,就是直接訪問D:/eclipse3.3/jb51.net/tomcat/目錄下的文件了。


2.tomcat的web.xml(在conf目錄下),在該文件中找到

復(fù)制代碼 代碼如下:

    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

這是tomcat默認的3個文件,當(dāng)你輸入指定路徑后,tomcat會自動查找這3個頁面。如果你想讓tomcat自動找到自己的頁面,比如main.jsp??梢孕薷纳厦嫘畔椋?BR>

復(fù)制代碼 代碼如下:

    <welcome-file-list>
        <welcome-file>main.jsp</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>

   
這樣就可以了。

相關(guān)文章

最新評論

汉寿县| 广德县| 秭归县| 星子县| 凤阳县| 无棣县| 利辛县| 溆浦县| 岚皋县| 高雄县| 华池县| 图木舒克市| 沿河| 奉化市| 乌拉特中旗| 突泉县| 盐池县| 天峻县| 泽普县| 肇庆市| 江川县| 若尔盖县| 大同县| 蛟河市| 密山市| 旺苍县| 太康县| 嘉祥县| 七台河市| 徐水县| 弋阳县| 腾冲县| 科技| 基隆市| 丰都县| 贡觉县| 随州市| 纳雍县| 溧水县| 芷江| 杭锦后旗|