views:

78

answers:

1

Our web app contains both index.html and index.jsp, and we use Apache Tomcat 6. When a request having the path till the context (for eg.,http://localhost:8080/mysite) comes to the tomcat which one will be served ?

Is this index.html or index.jsp ?

Is it configurable ?

+1  A: 

index.html will be given preference, but you can change this under welcome-file-list in web.xml.

<welcome-file-list>
   <welcome-file>index.jsp</welcome-file>
   <welcome-file>index.html</welcome-file>
   <welcome-file>index.htm</welcome-file>
</welcome-file-list>

In the event of a partial request, the above configuration will try index.jsp, then index.html, and then index.htm.

danben
the last one is index.htm not html, please correct the typo.
novice