...\TomcatXXX.x\webapps\ROOT\WEB-INF下面有一个:web.xml    <servlet>
        <servlet-name>org.apache.jsp.index_jsp</servlet-name>
        <servlet-class>org.apache.jsp.index_jsp</servlet-class>
    </servlet>    <servlet-mapping>
        <servlet-name>org.apache.jsp.index_jsp</servlet-name>
        <url-pattern>/index2.jsp</url-pattern>
    </servlet-mapping>这是tomcat的缺省访问页面...\TomcatXXX.x\webapps\ROOT\WEB-INF下面还有一个:\lib\catalina-root.jar
看看他的内容就明白了。

解决方案 »

  1.   

    我将他改为:<url-pattern>/index2.jsp</url-pattern>(如上)就不会出现你说的问题了。
      

  2.   

    ...\Tomcatx.x\conf\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-list>
    所有这些就是你输入http://localhost:port/之后出现index.jsp的原因了。
    如果你将上述都改为index2也会出现上述问题。
      

  3.   

    在你自己的工程里的web.xml中添加welcome-file-list不久行了么