I have a home page home.html inside a war file named "webapp-1.0.war". When the browser requests "http://domain/myapp" I want the home.html served up, but I want the browswer address bar to continue to display "http://domain/myapp". I DO NOT want "http://domain/myapp/home.html" in the address bar.
So I put this into the web.xml:
<welcome-file-list>
<welcome-file>home.html</welcome-file>
</welcome-file-list>
And I added a jboss-web.xml with the following:
<jboss-web>
<context-root>myapp</context-root>
</jboss-web>
This almost works. When the browser requests "http://domain/myapp" the home.html is sent, but the mime type is application/octet-stream instead of text/html, and this makes Firefox think it is a file download.