0

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 ?

Maniganda Prakash
  • 4,702
  • 8
  • 34
  • 42

1 Answers1

3

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
  • 80,905
  • 18
  • 123
  • 145