问答详情
源自:3-1 [Java Web] 第一个过滤器案例

最最zzzz

为什么会访问到index.jsp,程序中或者浏览器地址栏没有index.jsp

提问者:Sugaweh 2016-10-20 21:58

个回答

  • 水月灬清影
    2016-10-20 23:02:32

    你打开web.xml   会有

     <welcome-file-list>

        <welcome-file>index.html</welcome-file>

        <welcome-file>index.htm</welcome-file>

        <welcome-file>index.jsp</welcome-file>

        <welcome-file>default.html</welcome-file>

        <welcome-file>default.htm</welcome-file>

        <welcome-file>default.jsp</welcome-file>

      </welcome-file-list>

    这么一段.如果你不指定文件,它也会默认在这些中匹配,找到就访问  .你可以把这段删掉试试效果.