修改你的应用的WEB-INF\web.xml文件

解决方案 »

  1.   

    ../conf/web.xml文件的末尾部分,就是搜索目录缺省文件名的定义。
       
     <welcome-file-list>
            <welcome-file>main.html</welcome-file>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
            <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>
    第一行的main.html是我添加上的,这样就可以使用main.html了~
      

  2.   

    修改了web.xml
    <welcome-file-list>
        <welcome-file>main.jsp</welcome-file>
      </welcome-file-list>这样只是改写了默认目录tomcat\webapps\root\的welcome文件,如果我想该我的d:\web\下的welcome文件应怎么设置呢?
      

  3.   

    修改tomcat里面conf/web.xml文件的末尾部分   
     <welcome-file-list>
            <welcome-file>main.html</welcome-file>//main.html是你自己想要运行的文件名
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
            <welcome-file>index.jsp</welcome-file>
     </welcome-file-list>
      

  4.   

    我顶
    不过最好同时也修改yourweb-site/WEB-INF/web.xml
    <welcome-file-list>
        <welcome-file>main.jsp</welcome-file>
    </welcome-file-list>