31.10.2007

HowTo - Tomcat Wiki


How do I override the default home page loaded by Tomcat?


After successfully installing Tomcat, you usually test it by loading [WWW] http://localhost:8080 . The contents of that page are compiled into the index_jsp servlet. The page even warns against modifying the index.jsp files for this reason. Luckily, it is quite easy to override that page. Inside $TOMCAT_HOME/conf/web.xml there is a section called <welcome-file-list> and it looks like this:
    <welcome-file-list>
<welcome-file>index.html</welcome-file-list>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
HowTo - Tomcat Wiki

Blogged with Flock