隨筆 - 0, 文章 - 264, 評論 - 170, 引用 - 0
          數(shù)據(jù)加載中……

          關(guān)于web.xml中的(注:轉(zhuǎn)載于http://yjshengshe.javaeye.com/blog/641934)

          問題:
          <welcome-file-list>中的<welcome-file>標(biāo)簽部分除了放具體的jsp或html頁面(例如下)
            <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
            <welcome-file>index.html</welcome-file>
            </welcome-file-list>
          外能不能放一個(gè)請求在里面?(例如下)
            <welcome-file-list>
            <welcome-file>index.do</welcome-file>
            </welcome-file-list>

          我用spring MVC,按照以下配置
            <welcome-file-list>
            <welcome-file>index.do</welcome-file>
            </welcome-file-list>
          啟動服務(wù)器,終是報(bào)404錯(cuò)誤,但我在地址欄手工加入index.do時(shí),頁面正常顯示,這是為什么,是不是服務(wù)器不支持這樣的寫法(index.do)????如果支持應(yīng)該如何寫????

          回答:

          支持...不過tomcat 會去檢查有沒有index.do這個(gè)文件.

          意思大概就是這樣,首先讀取 welcome list,然后取得第一個(gè)index,然后到web中的路徑中查找有沒有這個(gè)文件,沒有繼續(xù)第二個(gè).
          然后繼續(xù)下去沒有,就提示沒有主頁.

          解決辦法:
          在你的WebRoot 下添加一個(gè)空白的文件命名為 index.do

          posted on 2010-12-26 10:21 小一敗涂地 閱讀(430) 評論(0)  編輯  收藏 所屬分類: tomcat、apache、jboss等服務(wù)器相關(guān)

          主站蜘蛛池模板: 喀喇沁旗| 四子王旗| 文登市| 荥经县| 定西市| 尼勒克县| 清水县| 利辛县| 宜宾市| 岱山县| 从化市| 乌兰察布市| 彭阳县| 东海县| 威宁| 邵东县| 宜都市| 含山县| 西乌珠穆沁旗| 台州市| 清涧县| 永仁县| 福州市| 新郑市| 洛阳市| 白沙| 射洪县| 涿鹿县| 章丘市| 开江县| 南投市| 稷山县| 永善县| 安平县| 大邑县| 蒲城县| 柳林县| 广德县| 凤山市| 普兰店市| 博湖县|