有一个网站,我想在网站上加一个首页a.html,每次启动网站,进入的第一个页面就是a.html,应该怎默弄 ,我用的是tomcat

解决方案 »

  1.   

    在XML文件中改
    也可以把文件名改为INDEX.HTML
      

  2.   

    在XML文件中改
    也可以把文件名改为INDEX.HTML
    正解,可以在WEB。XML中配置welcome-list标签,或者直接改名字为index.html
      

  3.   

    在web.xml中添加或者修改
      <welcome-file-list>
        <welcome-file>a.jsp</welcome-file>
      </welcome-file-list>
      

  4.   

    在web.xml中添加或者修改
    <web-app >
        ...
        <welcome-file-list>
            <welcome-file>(路径)a.jsp</welcome-file>
        </welcome-file-list>
        ...
    </web-app >
    如果a.jsp就在应用的根目录下则不写路径
      

  5.   

    <!-- The Welcome File List -->
      <welcome-file-list>
        <welcome-file>a.jsp</welcome-file>
      </welcome-file-list>
      

  6.   

    <welcome-file-list>
        <welcome-file>a.jsp</welcome-file>
      </welcome-file-list>